 |
ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
|
Go to the documentation of this file.
20 #include "../../include/esp3d_config.h"
21 #if defined (HTTP_FEATURE)
22 #include "../commands.h"
23 #include "../esp3doutput.h"
24 #include "../settings_esp3d.h"
25 #include "../../modules/authentication/authentication_service.h"
32 #ifdef AUTHENTICATION_FEATURE
34 output->
printERROR(
"Wrong authentication!", 401);
39 #endif //AUTHENTICATION_FEATURE
42 if (parameter.length() == 0) {
45 #ifdef AUTHENTICATION_FEATURE
47 output->
printERROR(
"Wrong authentication!", 401);
50 #endif //AUTHENTICATION_FEATURE
51 parameter.toUpperCase();
52 if (!((parameter ==
"ON") || (parameter ==
"OFF"))) {
53 output->
printERROR(
"Only ON or OFF mode supported!");
static bool write_byte(int pos, const uint8_t value)
const char * get_param(const char *cmd_params, const char *label)
bool ESP120(const char *cmd_params, level_authenticate_type auth_level, ESP3DOutput *output)
size_t printMSG(const char *s, bool withNL=true)
size_t printERROR(const char *s, int code_error=200)
static uint8_t read_byte(int pos, bool *haserror=NULL)