mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-06-30 12:05:10 +08:00
Allow to disable Serial ESP commands
Web commands are still working, only input from serial is disabled for ESP module not for printer,
This commit is contained in:
parent
ba84a06fc8
commit
535f26cdf5
@ -130,7 +130,6 @@ void COMMAND::execute_command(int cmd,String cmd_params)
|
|||||||
|
|
||||||
void COMMAND::check_command(String buffer)
|
void COMMAND::check_command(String buffer)
|
||||||
{
|
{
|
||||||
String ESP_Command;
|
|
||||||
static bool bfileslist=false;
|
static bool bfileslist=false;
|
||||||
static uint32_t start_list=0;
|
static uint32_t start_list=0;
|
||||||
if (!bfileslist) {
|
if (!bfileslist) {
|
||||||
@ -141,7 +140,6 @@ void COMMAND::check_command(String buffer)
|
|||||||
bfileslist=true;
|
bfileslist=true;
|
||||||
web_interface->fileslist.clear();
|
web_interface->fileslist.clear();
|
||||||
}
|
}
|
||||||
int ESPpos = buffer.indexOf("[ESP");
|
|
||||||
int Tpos = buffer.indexOf("T:");
|
int Tpos = buffer.indexOf("T:");
|
||||||
int Xpos = buffer.indexOf("X:");
|
int Xpos = buffer.indexOf("X:");
|
||||||
int Ypos = buffer.indexOf("Y:");
|
int Ypos = buffer.indexOf("Y:");
|
||||||
@ -151,6 +149,9 @@ void COMMAND::check_command(String buffer)
|
|||||||
int Errorpos= buffer.indexOf("Error:");
|
int Errorpos= buffer.indexOf("Error:");
|
||||||
int Infopos= buffer.indexOf("Info:");
|
int Infopos= buffer.indexOf("Info:");
|
||||||
int Statuspos= buffer.indexOf("Status:");
|
int Statuspos= buffer.indexOf("Status:");
|
||||||
|
#ifdef SERIAL_COMMAND_FEATURE
|
||||||
|
String ESP_Command;
|
||||||
|
int ESPpos = buffer.indexOf("[ESP");
|
||||||
if (ESPpos>-1) {
|
if (ESPpos>-1) {
|
||||||
//is there the second part?
|
//is there the second part?
|
||||||
int ESPpos2 = buffer.indexOf("]",ESPpos);
|
int ESPpos2 = buffer.indexOf("]",ESPpos);
|
||||||
@ -169,6 +170,7 @@ void COMMAND::check_command(String buffer)
|
|||||||
//if not is not a valid [ESPXXX] command
|
//if not is not a valid [ESPXXX] command
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//check for temperature
|
//check for temperature
|
||||||
if (Tpos>-1) {
|
if (Tpos>-1) {
|
||||||
//look for valid temperature answer
|
//look for valid temperature answer
|
||||||
|
@ -35,6 +35,9 @@
|
|||||||
//WEB_UPDATE_FEATURE: allow to flash fw using web UI
|
//WEB_UPDATE_FEATURE: allow to flash fw using web UI
|
||||||
#define WEB_UPDATE_FEATURE
|
#define WEB_UPDATE_FEATURE
|
||||||
|
|
||||||
|
//SERIAL_COMMAND_FEATURE: allow to send command by serial
|
||||||
|
#define SERIAL_COMMAND_FEATURE
|
||||||
|
|
||||||
#ifndef CONFIG_h
|
#ifndef CONFIG_h
|
||||||
#define CONFIG_h
|
#define CONFIG_h
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user