remove \r
This commit is contained in:
2023-12-02 10:18:09 +01:00
parent 1072e349c0
commit 5268ad0b7a

View File

@@ -35,9 +35,9 @@ static void tcp_cmd_write(struct tcp_pcb* pcb, const char* str) {
* @param pcb The tcp_pcb struct to write to * @param pcb The tcp_pcb struct to write to
*/ */
static void tcp_cmd_print_header(struct tcp_pcb* pcb) { static void tcp_cmd_print_header(struct tcp_pcb* pcb) {
tcp_cmd_write(pcb, " Welcome to the TCP CMD interface\r\n" tcp_cmd_write(pcb, " Welcome to the TCP CMD interface\n"
"(Type help for a list of the commands! exit to close)\r\n" "(Type help for a list of the commands! exit to close)\n"
"============================================================\r\n" "============================================================\n"
"$>"); "$>");
} }
@@ -46,15 +46,15 @@ static void tcp_cmd_print_header(struct tcp_pcb* pcb) {
* @param pcb The tcp_pcb struct to write to * @param pcb The tcp_pcb struct to write to
*/ */
static void tcp_cmd_print_help(struct tcp_pcb* pcb) { static void tcp_cmd_print_help(struct tcp_pcb* pcb) {
tcp_cmd_write(pcb, "help : shows a list of commands\r\n" tcp_cmd_write(pcb, "help : shows a list of commands\n"
"clear text/images : clears the text or images on the lcd\r\n" "clear text/images : clears the text or images on the lcd\n"
"text \"<text>\" : puts text on the lcd\r\n" "text \"<text>\" : puts text on the lcd\n"
"bgColor <r> <g> <b> : set the background color of the lcd\r\n" "bgColor <r> <g> <b> : set the background color of the lcd\n"
"color <r> <g> <b> : set the color of the text\r\n" "color <r> <g> <b> : set the color of the text\n"
"listFiles : shows a list with images in the filesystem\r\n" "listFiles : shows a list with images in the filesystem\n"
"setImage <image_name> : put an image on the screen\r\n" "setImage <image_name> : put an image on the screen\n"
"setGif <image_name> : put a gif on the screen\r\n" "setGif <image_name> : put a gif on the screen\n"
"exit : closes the connection\r\n"); "exit : closes the connection\n");
} }
/** /**
@@ -176,8 +176,8 @@ static bool tcp_cmd_parser(struct tcp_pcb* pcb, int argc, char** argv) {
return false; return false;
} }
LOG_WARN(TAG, "Bad usage of clear"); LOG_WARN(TAG, "Bad usage of clear");
tcp_cmd_write(pcb, "Usage: clear text\r\n"); tcp_cmd_write(pcb, "Usage: clear text\n");
tcp_cmd_write(pcb, "Usage: clear images\r\n"); tcp_cmd_write(pcb, "Usage: clear images\n");
return false; return false;
} }
} }
@@ -243,7 +243,7 @@ static bool tcp_cmd_parser(struct tcp_pcb* pcb, int argc, char** argv) {
llfs_file_t* file; llfs_file_t* file;
while ((file = llfs_next_file(&mem, NULL)) != NULL) { while ((file = llfs_next_file(&mem, NULL)) != NULL) {
tcp_cmd_write(pcb, file->name); tcp_cmd_write(pcb, file->name);
tcp_cmd_write(pcb, "\r\n"); tcp_cmd_write(pcb, "\n");
} }
return false; return false;
} }
@@ -308,7 +308,7 @@ static bool tcp_cmd_parser(struct tcp_pcb* pcb, int argc, char** argv) {
tcp_cmd_write(pcb, "Unknown command: "); tcp_cmd_write(pcb, "Unknown command: ");
tcp_cmd_write(pcb, argv[0]); tcp_cmd_write(pcb, argv[0]);
tcp_cmd_write(pcb, "\n"); tcp_cmd_write(pcb, "\n");
tcp_cmd_write(pcb, "Type help for list of commands\r\n"); tcp_cmd_write(pcb, "Type help for list of commands\n");
return false; return false;
} }