BRT Community
General Category => Discussion - EVE => Topic started by: elektor18 on July 31, 2019, 04:00:52 PM
-
Hi All,
I struggling to load image and custom font from MCU to the display.
Font:
StartAddress2 = End_Address1;
API_LIB_WriteDataRAMG(DigitsFont, sizeof(DigitsFont), StartAddress2);
API_LIB_BeginCoProList();
API_CMD_DLSTART();
API_CLEAR_COLOR_RGB(0, 0, 0);
API_CLEAR(1,1,1);
API_BITMAP_HANDLE(15);
API_BITMAP_SOURCE((StartAddress12+148)-(32*3*15));
API_BITMAP_LAYOUT(L2,3,15);
API_BITMAP_SIZE(NEAREST, BORDER, BORDER, 10,15);
API_CMD_SETFONT(15, StartAddress12);
API_COLOR_RGB(255,255,255);
API_CMD_TEXT(50,50,15,0,"HELLO");
API_CMD_TEXT(50, 100, 15,0, "12:00");
API_CMD_NUMBER(50,120,15,0,123);
API_DISPLAY();
API_CMD_SWAP();
API_LIB_EndCoProList();
API_LIB_AwaitCoProEmpty();
But it look like this part is overwriting my other images (I think so)?
-
Hello,
Please have a look at the following application note, this has an example of loading a custom font and an image concurrently:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT_AN_014_FT81X_Simple_PIC_Library_Examples.pdf (https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT_AN_014_FT81X_Simple_PIC_Library_Examples.pdf)
Best Regards,
BRT Community
-
Hi,
I can't see any good example to be honest.
So maybe once again, I want to load images and custom font to next available space in memory. How to calc needed space to avoid data corruption. PROPS command is good to get image data (x,y,w,h) or easy to check it size but what about custom fonts?
-
Hello,
Is the font compressed or non-compressed?
If its non compressed you can check the size of the data array for the font that's been written to RAM_G.
Best Regards,
BRT Community
-
It is not compressed and in L2 format. I tried get size in the same way as I did it with other images but for some reason it doesn't work. But if you saying it should be the same, I will analyse my code again (I did it 100 times anyway) and maybe I will spot mistake, if not, I will be back ;)
-
Bitmap Handle 15 is a scratch handle used by Eve built-in widget. See programming guide 5.66 cmd_setscratch.
I suggest to use other bitmap handle , 0 to 14 and see if it works.