Added clear functionality
Added lcd_clear_text and lcd_clear_images infront of each write function to the screen
This commit is contained in:
@@ -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] = tcp_buffer[i + 5];
|
||||||
}
|
}
|
||||||
text[i-1]='\0';
|
text[i-1]='\0';
|
||||||
|
lcd_clear_text(void);
|
||||||
lcd_display_text(text, 10, 10, result_txt, result_bg, LCD_FONT16);
|
lcd_display_text(text, 10, 10, result_txt, result_bg, LCD_FONT16);
|
||||||
|
|
||||||
check = 1;
|
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
|
// Check which file extension is used and call right function
|
||||||
if (strncmp(extension, "bmp", 3) == 0 && file_in_fs == 1) {
|
if (strncmp(extension, "bmp", 3) == 0 && file_in_fs == 1) {
|
||||||
|
lcd_clear_images(void);
|
||||||
lcd_draw_img_from_fs(filename, 10, 10);
|
lcd_draw_img_from_fs(filename, 10, 10);
|
||||||
}
|
}
|
||||||
else if (strncmp(extension, "gif", 3) == 0 && file_in_fs == 1) {
|
else if (strncmp(extension, "gif", 3) == 0 && file_in_fs == 1) {
|
||||||
|
lcd_clear_images(void);
|
||||||
lcd_draw_gif_from_fs(filename, 10, 10);
|
lcd_draw_gif_from_fs(filename, 10, 10);
|
||||||
}
|
}
|
||||||
else if (file_in_fs == 0){
|
else if (file_in_fs == 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user