From fb44367da718f28820665b55d5d745a1ed8d470e Mon Sep 17 00:00:00 2001 From: Roelandts_Gert Date: Mon, 27 Nov 2023 15:01:41 +0100 Subject: [PATCH] Fixed lcd_display_text --- project/Core/Src/main.c | 10 ++++------ project/Core/Src/tcp_cmd.c | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/project/Core/Src/main.c b/project/Core/Src/main.c index eb0c319..85ef22f 100644 --- a/project/Core/Src/main.c +++ b/project/Core/Src/main.c @@ -35,10 +35,6 @@ #include "tcp_cmd.h" #include "website_backend.h" -#include "cmd.h" -#include -#include -#include /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -132,8 +128,10 @@ int main(void) { /* Initialize the LCD */ lcd_init(true); - /* Initialize the filesystem */ - llfs_init(); + /* Initialize the filesystem */ + llfs_init(); + tcp_cmd_init(); + /* USER CODE END 2 */ /* Initialize the tftp server */ tftp_server_init(); diff --git a/project/Core/Src/tcp_cmd.c b/project/Core/Src/tcp_cmd.c index 410989d..4d73f12 100644 --- a/project/Core/Src/tcp_cmd.c +++ b/project/Core/Src/tcp_cmd.c @@ -62,7 +62,8 @@ static err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t } text[i - 1] = '\0'; lcd_clear_text(); - lcd_display_text(text, 10, 10, result_txt, LCD_FONT16); + lcd_display_text(text, 10, 10, result_txt, result_bg, LCD_FONT16); + check = 1; } else if (!strncmp(tcp_buffer, "color", 5)) {