General Category > Discussion - EVE

EVE3 to EVE4 - Big Font Display Issue

(1/4) > >>

LaZorraBRT:
I was previously using a EVE3 5" display and had a large custom font displaying without issue.  When I tried the same code on a EVE4 7" display, I am experiencing a corrupt display.  When I change the code to only display one large digit, it will display correctly.  Also, when I am displaying two digits and they happen to be the same digit, it will display correctly but if they differ it does not work. 

I tried to enable adaptive framerate using the following line under TFT_init but this did not have any effect:

--- Code: ---EVE_memWrite8(REG_ADAPTIVE_FRAMERATE, 0x1);

--- End code ---

I have included my code in a zip file and will include sample images in a following post when this post is approved.  I highly appreciate any help I can get on this issue, thank you!

Todd

This is the part of the code that is causing the display corruption on the 7inch:

--- Code: ---
EVE_cmd_dl_burst(DL_COLOR_RGB | WHITE);
EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_setbitmap_burst(0x800000 + 5254, EVE_COMPRESSED_RGBA_ASTC_8x8_KHR, 224, 384);
if (speedinttens > 0){
EVE_cmd_dl_burst(CELL(speedinttens));
EVE_cmd_dl_burst(VERTEX2F(50, 100));
}
EVE_cmd_dl_burst(CELL(speedintones));
EVE_cmd_dl_burst(VERTEX2F(290, 100));
EVE_cmd_dl_burst(CELL(speedinttenths));
EVE_cmd_dl_burst(VERTEX2F(530, 100));
EVE_cmd_dl_burst(DL_END);

--- End code ---

LaZorraBRT:
Here are included images of how it looks while it is working on an EVE3 5inch display and also on the EVE4 7inch display with only one large digit. 

Rudolph:
I was to suggest to use CMD_FONTCACHE for the digits.
But you are using a single very large image instead.
Try to split these up into individual images first instead of using CELL.

And furthermore you can take load off the flash by using CMD_FONTCACHE.
This commands uses RAM_G to buffer a couple of characters from a larger font in the flash.

EVE_init_flash();
EVE_cmd_flashread(MEM_FONT50, 167936, 192);
EVE_cmd_setfont2(12,MEM_FONT50-0x010000,0x010000);
EVE_cmd_fontcache(12, 0x00002000, 0x00009100);

This is setting up a cache of 64k just before your .xfont in RAM_G.
No idea if this is enough for the "SPEED" font but from the looks of it this should be plenty.

There also is CMD_FONTCACHEQUERY to help with the cache utilisation.
At least the last time I played with this the number of different characters displayed was a hard limit and exceeding it by only a single character ended in a crash.

LaZorraBRT:
I split the large numbers up into individual images but I am still having graphical glitches (where the top portion of the screen gets duplicated either 2x or x number of times).

For example, this code displays just fine:

--- Code: ---//Zero
EVE_cmd_setbitmap_burst(0x800000 + 5254, EVE_COMPRESSED_RGBA_ASTC_8x8_KHR, 224, 192); 
EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_dl_burst(VERTEX2F(150,300));
EVE_cmd_dl_burst(DL_END);

//One
EVE_cmd_setbitmap_burst(0x800000 + 5590, EVE_COMPRESSED_RGBA_ASTC_8x8_KHR, 80, 192); 
EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_dl_burst(VERTEX2F(480,300));
EVE_cmd_dl_burst(DL_END);


--- End code ---

But if I change the x coordinate on the Zero from 150 to 220, such as this, I get the glitch:


--- Code: ---//Zero
EVE_cmd_setbitmap_burst(0x800000 + 5254, EVE_COMPRESSED_RGBA_ASTC_8x8_KHR, 224, 192); 
EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_dl_burst(VERTEX2F(220,300));  //x changed from 150 to 220
EVE_cmd_dl_burst(DL_END);

//One
EVE_cmd_setbitmap_burst(0x800000 + 5590, EVE_COMPRESSED_RGBA_ASTC_8x8_KHR, 80, 192); 
EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_dl_burst(VERTEX2F(480,300));
EVE_cmd_dl_burst(DL_END);

--- End code ---

I can play with the coordinates and overlap the numbers on different areas of the screen and it displays fine, so I don't think its an issue with them being overlapped.  Even though in the 2nd bit of code, they shouldn't overlap.  I don't know why moving it to the right 70 pixels should cause the display to go wonky. 

I'll share my complete code and I would love it if someone could try this on their display and at least tell me if this works on another Eve 4. 

I'm really stumped and I'm almost thinking I have a bunk display.   I can upload the same code on my Eve 3 display and it works like a charm.  Not having much luck with Eve 4. 

I tried the fontcache code you shared Rudolph but that resulted in a blank display for me. Thank you, you put a lot of work into your replies and I highly appreciate it. 

Thank you for any help!

LaZorraBRT:
Here is the working x=150 and not working x=220.

Navigation

[0] Message Index

[#] Next page

Go to full version