convert text to english
This commit is contained in:
2023-11-29 00:44:50 +01:00
parent a784f3c33f
commit 2baa820683

View File

@@ -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 \"<text>\" : puts text on the lcd\r\n"
"color <r> <g> <b> : set the background color of the lcd\r\n"
"textColor <r> <g> <b> : set the color of the text\r\n"
"listImages : shows a list with images in the filesystem\r\n"
"setImage <image_name> : 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);