I have the following small application I want to try out:
And attached is the image (taken from the 4D ViSi IDE) of the small app I want to
try out (filename: Workshop 3_2012-02-20_08-37-13.png).
As you can see, the lower bound equals 16, the upper boundary equals 24. As such, the generated code tells me that numx, last parameter of the function img_SetWord(), should be a value between 16 and 24. Which, to me, looks logical...
However, when I give a value between 16 and 24, I see garbage on the LCD when the app is downloaded.
I only see a good image on the LCD (but wrong positioning of the needle), when values between 0 and 8. The scale is divided in 1/9th parts apparently, where it should normally be based on a value between 16 and 24 (are floating values also possible in the function img_SetWord()???).
I've also attached a zip file that contains the project, in case someone wants to try it out him/herself.
Code:
#platform "uLCD-32PT_GFX2"#inherit "4DGL_16bitColours.fnc"#inherit "VisualConst.inc"#inherit "WidgetsTestConst.inc"func main()// Uncomment the following if uSD images used.putstr("Mounting...\n");if (!(disk:=file_Mount()))while(!(disk :=file_Mount()))putstr("Drive not mounted...");pause(200);gfx_Cls();pause(200);wendendifputstr("Mounting successful...\n");pause(1000);gfx_Cls();gfx_TransparentColour(0x0020);gfx_Transparency(ON);hndl := file_LoadImageControl("WIDGET~1.dat", "WIDGET~1.gci", 1);// Form1 generated 20/02/2012 7:51:48// Angularmeter1 generated 20/02/2012 8:28:17img_SetWord(hndl, iAngularmeter1, IMAGE_INDEX, numx); // where numx is 16 to 24img_Show(hndl, iAngularmeter1);repeat foreverendfunc
try out (filename: Workshop 3_2012-02-20_08-37-13.png).
As you can see, the lower bound equals 16, the upper boundary equals 24. As such, the generated code tells me that numx, last parameter of the function img_SetWord(), should be a value between 16 and 24. Which, to me, looks logical...
However, when I give a value between 16 and 24, I see garbage on the LCD when the app is downloaded.
I only see a good image on the LCD (but wrong positioning of the needle), when values between 0 and 8. The scale is divided in 1/9th parts apparently, where it should normally be based on a value between 16 and 24 (are floating values also possible in the function img_SetWord()???).
I've also attached a zip file that contains the project, in case someone wants to try it out him/herself.
Comment