From 2baa820683b11a0470a7ed1fb4633672f2df2f2d Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Wed, 29 Nov 2023 00:44:50 +0100 Subject: [PATCH] tcp_cmd convert text to english --- project/Core/Src/tcp_cmd.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/project/Core/Src/tcp_cmd.c b/project/Core/Src/tcp_cmd.c index a37219c..e4c56ba 100644 --- a/project/Core/Src/tcp_cmd.c +++ b/project/Core/Src/tcp_cmd.c @@ -22,20 +22,21 @@ void tcp_cmd_write(struct tcp_pcb* pcb, const char* str) { } void tcp_cmd_print_header(struct tcp_pcb* pcb) { - tcp_cmd_write(pcb, " Welcome bij de TCP CMD Interface\r\n" - "(Typ help voor een lijst van de commando's! X om te sluiten)\r\n" - "============================================================\r\n" - "User: "); + tcp_cmd_write(pcb, " Welcome to the TCP CMD interface\r\n" + "(Type help for a list of the commands! exit to close)\r\n" + "============================================================\r\n" + "$>"); } void tcp_cmd_print_help(struct tcp_pcb* pcb) { - tcp_cmd_write(pcb, "help : laat lijst zien met alle commando's\r\n" - "text : geeft tekst mee die op LCD komt (uw_text)\r\n" - "color : kleur achtergrond van scherm (255 255 255)\r\n" - "textColor : kleur van tekst (255 255 255)\r\n" - "listImages: laat een lijst zien van de mogelijke afbeeldingen\r\n" - "setImage : veranderd te afbeelding (naam_afbeelding)\r\n" - "exit : sluit de verbinding\r\n"); + tcp_cmd_write(pcb, + "help : shows a list of commands\r\n" + "text \"\" : puts text on the lcd\r\n" + "color : set the background color of the lcd\r\n" + "textColor : set the color of the text\r\n" + "listImages : shows a list with images in the filesystem\r\n" + "setImage : put an image on the screen\r\n" + "exit : closes the connection\r\n"); } static err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err) { @@ -65,7 +66,6 @@ static err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t tcp_recved(pcb, p->tot_len); pc = (char*)p->payload; len = p->tot_len; - if (!strncmp(pc, "help", 4)) { check = 1; @@ -78,7 +78,6 @@ static err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t lcd_clear_text(); lcd_display_text(text, 10, 10, result_txt, result_bg, LCD_FONT24); - check = 1; } else if (!strncmp(pc, "color", 5)) { for (size_t i = 0; i < 3; i++) { @@ -162,7 +161,7 @@ static err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t } if (!check && (strncmp(pc, "\r\n", 2) != 0)) { - tcp_cmd_write(pcb, "Onbestaand commando: help voor lijst van commando's\r\n"); + tcp_cmd_write(pcb, "Nonexistent command: help for list of commands\r\n"); } pbuf_free(p);