|
Post by ceejee on Nov 30, 2015 13:22:18 GMT -8
Hi, I tried to crate a menue with a few buttons. As an example i show you the healsky image as a button. At first time it works. After a restart you only see this. once in a while the touoch function doesn't work, too. It doesn't work unti I do the "selftest" to recalibrate the Display. After that I have to upload one/a few simple images like this Last I reupload my Code with the menu and it works until a restart. I hope you have understand my problem and can tell me a way to fix it. I despair. Here my snippet to load and open the images. void setup() { GD.begin(); GD.BitmapHandle(1); GD.cmd_loadimage(-1, 0); GD.load("healsky3.jpg"); GD.BitmapHandle(2); GD.cmd_loadimage(-1, 0); GD.load("vor.jpg"); GD.BitmapHandle(3); GD.cmd_loadimage(-1, 0); GD.load("zur.jpg"); GD.BitmapHandle(4); GD.cmd_loadimage(-1, 0); GD.load("frag.jpg"); GD.BitmapHandle(5); GD.cmd_loadimage(-1, 0); GD.load("einst.jpg"); GD.BitmapHandle(8); GD.cmd_loadimage(-1, 0); GD.load("ceejee.jpg"); start(); void start() { GD.ClearColorRGB(0xFBFBF3); GD.Clear(); GD.Begin(BITMAPS); GD.Tag(1); GD.Vertex2ii(31, 70, 1); GD.Tag(2); GD.Vertex2ii(137, 70, 1); GD.Tag(3); GD.Vertex2ii(242, 70, 1); GD.Tag(4); GD.Vertex2ii(349, 70, 1); //Vor-Zurück GD.Tag(5); GD.Vertex2ii(0, 233 , 3); GD.Tag(6); GD.Vertex2ii(245, 233, 2); //Einst. Inf. GD.Tag(7); GD.Vertex2ii(0, 0, 4); GD.Tag(8); GD.Vertex2ii( 365, 0, 5);
GD.swap();
}
|
|
|
Post by jamesbowman on Dec 1, 2015 16:55:29 GMT -8
Maybe try starting with a simple program and build up. For example, this version only draws the 4 bitmaps. Does it run OK?
void setup()
{ GD.begin();
GD.BitmapHandle(1); GD.cmd_loadimage(0, 0); GD.load("healsky3.jpg");
start(); }
void start() { GD.ClearColorRGB(0xFBFBF3); GD.Clear(); GD.Begin(BITMAPS); GD.Tag(1); GD.Vertex2ii(31, 70, 1); GD.Tag(2); GD.Vertex2ii(137, 70, 1); GD.Tag(3); GD.Vertex2ii(242, 70, 1); GD.Tag(4); GD.Vertex2ii(349, 70, 1); GD.swap(); }
void loop() { }
|
|