diff --git a/project/Core/Src/cmd.c b/project/Core/Src/cmd.c index 5f7bcbe..1c2aa5f 100644 --- a/project/Core/Src/cmd.c +++ b/project/Core/Src/cmd.c @@ -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){