BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - LaZorraBRT

Pages: [1]
1
Discussion - EVE / EVE3 to EVE4 - Big Font Display Issue
« on: August 11, 2021, 02:21:38 PM »
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: [Select]
EVE_memWrite8(REG_ADAPTIVE_FRAMERATE, 0x1);

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: [Select]

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);

2
Discussion - EVE / Multiple Buttons Question
« on: August 03, 2021, 06:05:48 PM »
Hello,
I am trying to set up multiple buttons on a display.  I have two buttons and the first one is working fine to stop and start a counter.  However the second button is able to start the counter but then becomes inoperable when I try to stop the counter.  I am using the same code for both but I am new to this and can't figure out the issue.  I hope this is an easy fix, I've tried searching the forum but can't find an example. This is on a 7" EVE4 display.  Thank you for any help!

Todd

Code: [Select]
/* check for touch events and setup vars for TFT_display() */
void TFT_touch(void)
{
uint8_t tag;
uint8_t tag2;
static uint8_t toggle_lock = 0;
static uint8_t toggle_lock2 = 0;

if(EVE_busy()) /* is EVE still processing the last display list? */
{
return;
}

display_list_size = EVE_memRead16(REG_CMD_DL); /* debug-information, get the size of the last generated display-list */
tag = EVE_memRead8(REG_TOUCH_TAG); /* read the value for the first touch point */
    tag2 = EVE_memRead8(REG_TOUCH_TAG); /* necessary? or can just one tag be used? */

switch(tag)
{
case 0:
toggle_lock = 0;
break;

case 10: /* use button on top as on/off radio-switch */
if(toggle_lock == 0)
{
toggle_lock = 42;
if(toggle_state == 0)
{
toggle_state = EVE_OPT_FLAT;
}
else
{
toggle_state = 0;
}
}
break;


}

switch(tag2)
{
case 1:
toggle_lock2 = 0;
break;

case 11: /* use button on top as on/off radio-switch */
if(toggle_lock2 == 0)
{
toggle_lock2 = 42;
if(toggle_state2 == 0)
{
toggle_state2 = EVE_OPT_FLAT ;
}
else
{
toggle_state2 = 0;
}
}
break;
}
}

void TFT_display(void)
{
//static int32_t rotate = 0;


if(tft_active != 0)
{
#if defined (EVE_DMA)
uint16_t cmd_fifo_size;
cmd_fifo_size = EVE_dma_buffer_index*4; /* without DMA there is no way to tell how many bytes are written to the cmd-fifo */
#endif

EVE_start_cmd_burst(); /* start writing to the cmd-fifo as one stream of bytes, only sending the address once */

EVE_cmd_dl_burst(CMD_DLSTART); /* start the display list */
EVE_cmd_dl_burst(DL_CLEAR_RGB | BLACK); /* set the default clear color to white */
EVE_cmd_dl_burst(DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG); /* clear the screen - this and the previous prevent artifacts between lists, Attributes are the color, stencil and tag buffers */
EVE_cmd_dl_burst(TAG(0));

EVE_cmd_append_burst(MEM_DL_STATIC, num_dl_static); /* insert static part of display-list from copy in gfx-mem */
/* display a button */
EVE_cmd_dl_burst(DL_COLOR_RGB | GREEN);
EVE_cmd_fgcolor_burst(0x00c0c0c0); /* some grey */
EVE_cmd_dl_burst(TAG(10)); /* assign tag-value '10' to the button that follows */
EVE_cmd_button_burst(20,120,120,70, 28, toggle_state,"Touch!");
EVE_cmd_dl_burst(TAG(0)); /* no touch */


if(toggle_state != 0)
{
basicnumber++;
}

EVE_cmd_dl_burst(DL_COLOR_RGB | RED);
EVE_cmd_fgcolor_burst(0x00c0c0c0); /* some grey */
EVE_cmd_dl_burst(TAG(11));
EVE_cmd_button_burst(220,320,120,70, 28, toggle_state2,"Touch2!");
EVE_cmd_dl_burst(TAG(1)); /* no touch */

if(toggle_state2 != 0)
{
basicnumber2++;
}

EVE_cmd_dl_burst(DL_COLOR_RGB | PURPLE);
EVE_cmd_number_burst(120, EVE_VSIZE - 35, 26, EVE_OPT_RIGHTX|5, basicnumber);
EVE_cmd_number_burst(120, EVE_VSIZE - 20, 26, EVE_OPT_RIGHTX|6, basicnumber2);

EVE_cmd_dl_burst(DL_DISPLAY); /* instruct the graphics processor to show the list */
EVE_cmd_dl_burst(CMD_SWAP); /* make this list active */

EVE_end_cmd_burst(); /* stop writing to the cmd-fifo, the cmd-FIFO will be executed automatically after this or when DMA is done */
}
}


Pages: [1]