Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:59 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : TILE won't work inside IF/THEN?

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 06:45am 25 May 2023
Copy link to clipboard 
Print this post

Consider this code:


 Text 3*16,7*16,"Looking for SD card...."+P$
 On error skip
 Chdir "DATABASE"
 If MM.Errno Then
   P$="[FAILED!]"
   If CVGA Then TILE 27*2,8,RGB(red),,14,1
   FAIL=1
 Else
   P$="[OK]"
   If CVGA Then TILE 27*2,8,RGB(green),,4,1
 EndIf


It will not do the tiles, but if I run the exact same tile command at the prompt, it DOES tile the colour correctly.  This used to work in the last FW, but does not in the current firmware.  CVGA is simply a flag to tell the code if it is to use colour in the display or not.  Currently set to 1.

All the other TILE commands are working, but they are on their own lines.
Did this change in the latest firmware?

Specifically, is IF CVGA THEN TILE... kind of syntax no longer allowed or something?



Smoke makes things work. When the smoke gets out, it stops!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 07:08am 25 May 2023
Copy link to clipboard 
Print this post

If the text command outputs aligned with tiles then it will itself set the tile colour. In this case you don't need the tile command just put the colours into the text command. I suspect the tile command is working but is being overridden by a subsequent text command
Edited 2023-05-25 17:13 by matherp
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 07:17am 25 May 2023
Copy link to clipboard 
Print this post

OK, thank you, I will delve deeper.
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024