diff --git a/project/Core/Src/main.c b/project/Core/Src/main.c index f4b0917..1aece27 100644 --- a/project/Core/Src/main.c +++ b/project/Core/Src/main.c @@ -29,6 +29,7 @@ #include "log.h" #include "llfs.h" #include "lcd_api.h" +#include "modbus-tcp.h" /* USER CODE END Includes */ diff --git a/project/Core/Src/modbus-tcp.c b/project/Core/Src/modbus-tcp.c index 391e711..08717c4 100644 --- a/project/Core/Src/modbus-tcp.c +++ b/project/Core/Src/modbus-tcp.c @@ -80,7 +80,7 @@ static err_t modbus_incomming_data(void *arg, struct tcp_pcb *pcb, struct pbuf * result_txt |= ((uint32_t)txt_green) << 8; result_txt |= txt_blue; - lcd_display_text(textstring, 10, 50, result_txt, result_bg, LCD_FONT24); + lcd_display_text(textstring, 10, 10, result_txt, result_bg, LCD_FONT24); // proccesing the image index size_t number_of_files = llfs_file_count(); // hoeveel files er zijn @@ -89,9 +89,8 @@ static err_t modbus_incomming_data(void *arg, struct tcp_pcb *pcb, struct pbuf * number_of_files = llfs_file_list(file_list, number_of_files, NULL); // vrijgemaakt geheugen invullen met de lijst - lcd_display_text(file_list[nr_img - 1].name, 10, 75, LCD_COLOR_MAGENTA, LCD_COLOR_YELLOW, LCD_FONT24); // putting the file name on screen - // functie_voor_naam + lcd_draw_img_from_fs(file_list[nr_img - 1].name, 10, 30); //BMP on screen } else if (err == ERR_OK){ tcp_close(pcb); // when everithing was ok close the tcpconnection