mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-13 18:55:57 +08:00
Fix bug reading Macro on SPIFFS
This commit is contained in:
parent
e7252dca66
commit
2714904c52
@ -1217,10 +1217,12 @@ bool COMMAND::execute_command(int cmd,String cmd_params, tpipe output, level_aut
|
|||||||
if (currentfile) {//if file open success
|
if (currentfile) {//if file open success
|
||||||
//flush to be sure send buffer is empty
|
//flush to be sure send buffer is empty
|
||||||
ESP_SERIAL_OUT.flush();
|
ESP_SERIAL_OUT.flush();
|
||||||
//read content
|
|
||||||
String currentline = currentfile.readString();
|
|
||||||
//until no line in file
|
//until no line in file
|
||||||
while (currentline.length() >0) {
|
while (currentfile.available()) {
|
||||||
|
String currentline = currentfile.readStringUntil('\n');
|
||||||
|
currentline.replace("\n","");
|
||||||
|
currentline.replace("\r","");
|
||||||
|
if (currentline.length() > 0) {
|
||||||
int ESPpos = currentline.indexOf("[ESP");
|
int ESPpos = currentline.indexOf("[ESP");
|
||||||
if (ESPpos>-1) {
|
if (ESPpos>-1) {
|
||||||
//is there the second part?
|
//is there the second part?
|
||||||
@ -1246,9 +1248,8 @@ bool COMMAND::execute_command(int cmd,String cmd_params, tpipe output, level_aut
|
|||||||
delay(0);
|
delay(0);
|
||||||
ESP_SERIAL_OUT.flush();
|
ESP_SERIAL_OUT.flush();
|
||||||
}
|
}
|
||||||
currentline="";
|
delay(0);
|
||||||
//read next line if any
|
}
|
||||||
currentline = currentfile.readString();
|
|
||||||
}
|
}
|
||||||
currentfile.close();
|
currentfile.close();
|
||||||
BRIDGE::println(OK_CMD_MSG, output);
|
BRIDGE::println(OK_CMD_MSG, output);
|
||||||
|
@ -186,7 +186,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#include "wificonf.h"
|
#include "wificonf.h"
|
||||||
//version and sources location
|
//version and sources location
|
||||||
#define FW_VERSION "0.9.99"
|
#define FW_VERSION "0.9.100"
|
||||||
#define REPOSITORY "https://github.com/luc-github/ESP3D"
|
#define REPOSITORY "https://github.com/luc-github/ESP3D"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user