 |
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 #include "../commands.h"
22 #include "../esp3doutput.h"
23 #include "../settings_esp3d.h"
24 #include "../../modules/authentication/authentication_service.h"
26 #include "../../modules/camera/camera.h"
27 #endif //CAMERA_DEVICE
29 #include "../../modules/dht/dht.h"
32 #include "../../modules/buzzer/buzzer.h"
33 #endif //BUZZER_DEVICE
34 #ifdef TIMESTAMP_FEATURE
35 #include "../../modules/time/time_server.h"
36 #endif //TIMESTAMP_FEATURE
37 #ifdef NOTIFICATION_FEATURE
38 #include "../../modules/notifications/notifications_service.h"
39 #endif //NOTIFICATION_FEATURE
41 #include "../../modules/filesystem/esp_sd.h"
49 #ifdef AUTHENTICATION_FEATURE
51 output->
printERROR(
"Wrong authentication!", 401);
56 #endif //AUTHENTICATION_FEATURE
58 String spos =
get_param (cmd_params,
"P=");
59 String styp =
get_param (cmd_params,
"T=");
60 String sval =
get_param (cmd_params,
"V=");
61 if (spos.length() == 0) {
64 if (! (styp ==
"B" || styp ==
"S" || styp ==
"A" || styp ==
"I" || styp ==
"F") ) {
70 if ((styp ==
"B") || (styp ==
"F")) {
75 switch(spos.toInt()) {
87 #ifdef TIMESTAMP_FEATURE
91 #endif //TIMESTAMP_FEATURE
92 #ifdef NOTIFICATION_FEATURE
96 #endif //NOTIFICATION_FEATURE
104 if (sval.toInt() == 1) {
106 }
else if (sval.toInt() == 0) {
110 #endif //BUZZER_DEVICE
122 switch(spos.toInt()) {
132 #endif //CAMERA_DEVICE
144 switch(spos.toInt()) {
145 #ifdef AUTHENTICATION_FEATURE
148 AuthenticationService::update();
150 #endif //AUTHENTICATION_FEATURE
156 #if defined (WIFI_FEATURE)
166 #endif //WIFI_FEATURE
static bool write_byte(int pos, const uint8_t value)
bool setInterval(uint interval)
const char * get_param(const char *cmd_params, const char *label)
NotificationsService notificationsservice
void setAutonotification(bool value)
bool ESP401(const char *cmd_params, level_authenticate_type auth_level, ESP3DOutput *output)
static uint8_t GetSDDevice(bool fromsettings=false)
#define ESP_AUTO_NOTIFICATION
static bool write_uint32(int pos, const uint32_t value)
#define ESP_INTERNET_TIME
static uint8_t GetFirmwareTarget(bool fromsettings=false)
size_t printMSG(const char *s, bool withNL=true)
size_t printERROR(const char *s, int code_error=200)
static bool write_string(int pos, const char *byte_buffer)
static bool write_IP_String(int pos, const char *value)
#define ESP_SD_DEVICE_TYPE
BuzzerDevice esp3d_buzzer
static bool setSPISpeedDivider(uint8_t speeddivider)