Improve message feedback for [ESP401]

set error message with code 500 instead of 200
fix ??? typo
This commit is contained in:
Luc 2020-04-12 18:34:31 +02:00
parent b0d35c245b
commit 8d75796900
4 changed files with 8 additions and 5 deletions

View File

@ -82,7 +82,7 @@ public:
}
size_t dispatch (uint8_t * sbuf, size_t len);
size_t printMSG(const char * s, bool withNL = true);
size_t printERROR(const char * s, int code_error = 200);
size_t printERROR(const char * s, int code_error = 500);
size_t printLN(const char * s);
void flush();
int availableforwrite();

View File

@ -166,9 +166,12 @@ bool Commands::ESP401(const char* cmd_params, level_authenticate_type auth_type,
#endif //WIFI_FEATURE
}
if (!response) {
output->printERROR ("Incorrect command!");
String tmp = "error " + spos;
output->printERROR (tmp);
} else {
output->printMSG("ok");
String tmp = "ok " + spos;
output->printMSG(tmp)
}
return response;

View File

@ -708,7 +708,7 @@ bool Commands::ESP420(const char* cmd_params, level_authenticate_type auth_type,
output->print ("/");
output->print (WiFi.softAPmacAddress().c_str());
} else {
output->print ("???");
output->print ("unknown");
}
if (!plain) {
output->print ("\"}");

View File

@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H
//version and sources location
#define FW_VERSION "3.0.0.a29"
#define FW_VERSION "3.0.0.a30"
#define REPOSITORY "https://github.com/luc-github/ESP3D"
#endif //_VERSION_ESP3D_H