Skip to content

Commit

Permalink
🎨 Use defined strings
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed May 22, 2021
1 parent 6861b1e commit c85633b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Marlin/src/lcd/extui/mks_ui/wifi_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,9 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {

if (tmpStr == 0) {
gCfgItems.fileSysType = FILE_SYS_SD;
send_to_wifi((uint8_t *)"Begin file list\r\n", strlen("Begin file list\r\n"));
send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n"));
get_file_list((char *)"0:/");
send_to_wifi((uint8_t *)"End file list\r\n", strlen("End file list\r\n"));
send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n"));
SEND_OK_TO_WIFI;
break;
}
Expand All @@ -634,7 +634,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
char *path = (char *)tempBuf;

if (strlen((char *)&tmpStr[index]) < 80) {
send_to_wifi((uint8_t *)"Begin file list\r\n", strlen("Begin file list\r\n"));
send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n"));

if (strncmp((char *)&tmpStr[index], "1:", 2) == 0)
gCfgItems.fileSysType = FILE_SYS_SD;
Expand All @@ -643,7 +643,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {

strcpy((char *)path, (char *)&tmpStr[index]);
get_file_list(path);
send_to_wifi((uint8_t *)"End file list\r\n", strlen("End file list\r\n"));
send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n"));
}
SEND_OK_TO_WIFI;
}
Expand Down

0 comments on commit c85633b

Please sign in to comment.