Added clear functionality

Added lcd_clear_text and lcd_clear_images infront of each write function to the screen
This commit is contained in:
Roelandts_Gert
2023-11-20 15:47:00 +01:00
committed by Sander Speetjens
parent 398bb2efde
commit 1bcd9f1113

View File

@@ -78,6 +78,7 @@ static err_t echo_recv( void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t er
text[i] = tcp_buffer[i + 5];
}
text[i-1]='\0';
lcd_clear_text(void);
lcd_display_text(text, 10, 10, result_txt, result_bg, LCD_FONT16);
check = 1;
@@ -149,9 +150,11 @@ static err_t echo_recv( void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t er
// Check which file extension is used and call right function
if (strncmp(extension, "bmp", 3) == 0 && file_in_fs == 1) {
lcd_clear_images(void);
lcd_draw_img_from_fs(filename, 10, 10);
}
else if (strncmp(extension, "gif", 3) == 0 && file_in_fs == 1) {
lcd_clear_images(void);
lcd_draw_gif_from_fs(filename, 10, 10);
}
else if (file_in_fs == 0){