 |
ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
|
Go to the documentation of this file.
24 #ifndef _SETTINGS_ESP3D_H
25 #define _SETTINGS_ESP3D_H
31 #define MARLINKIMBRA 3
32 #define SMOOTHIEWARE 4
39 #define ESP_RADIO_MODE 0 //1 byte = flag
40 #define ESP_STA_SSID 1 //33 bytes 32+1 = string ; warning does not support multibyte char like chinese
41 #define ESP_STA_PASSWORD 34 //65 bytes 64 +1 = string ;warning does not support multibyte char like chinese
42 #define ESP_STA_IP_MODE 99 //1 byte = flag
43 #define ESP_STA_IP_VALUE 100 //4 bytes xxx.xxx.xxx.xxx
44 #define ESP_STA_MASK_VALUE 104 //4 bytes xxx.xxx.xxx.xxx
45 #define ESP_STA_GATEWAY_VALUE 108 //4 bytes xxx.xxx.xxx.xxx
46 #define ESP_BAUD_RATE 112 //4 bytes = int
47 #define ESP_NOTIFICATION_TYPE 116 //1 byte = flag
48 #define ESP_CALIBRATION 117 //1 byte = flag
49 #define ESP_AP_CHANNEL 118 //1 byte = flag
50 #define ESP_BUZZER 119 //1 byte = flag
51 #define ESP_INTERNET_TIME 120 //1 byte = flag
52 #define ESP_HTTP_PORT 121 //4 bytes = int
53 #define ESP_TELNET_PORT 125 //4 bytes = int
54 #define ESP_OUTPUT_FLAG 129 //1 bytes = flag
55 #define ESP_HOSTNAME 130 //33 bytes 32+1 = string ; warning does not support multibyte char like chinese
56 #define ESP_DHT_INTERVAL 164 //4 bytes = int
57 #define ESP_SETTINGS_VERSION 168 //8 bytes = 7+1 = string ESP3D + 2 digits
58 #define ESP_ADMIN_PWD 176 //21 bytes 20+1 = string ; warning does not support multibyte char like chinese
59 #define ESP_USER_PWD 197 //21 bytes 20+1 = string ; warning does not support multibyte char like chinese
60 #define ESP_AP_SSID 218 //33 bytes 32+1 = string ; warning does not support multibyte char like chinese
61 #define ESP_AP_PASSWORD 251 //65 bytes 64 +1 = string ;warning does not support multibyte char like chinese
62 #define ESP_AP_IP_VALUE 316 //4 bytes xxx.xxx.xxx.xxx
63 #define ESP_BOOT_DELAY 320 //4 bytes xxx.xxx.xxx.xxx
64 #define ESP_WEBSOCKET_PORT 324 //4 bytes xxx.xxx.xxx.xxx
65 #define ESP_HTTP_ON 328 //1 byte = flag
66 #define ESP_TELNET_ON 329 //1 byte = flag
67 #define ESP_WEBSOCKET_ON 330 //1 byte = flag
68 #define ESP_SD_SPEED_DIV 331 //1 byte = flag
69 #define ESP_NOTIFICATION_TOKEN1 332 //64 bytes 63+1 = string ; warning does not support multibyte char like chinese
70 #define ESP_NOTIFICATION_TOKEN2 396 //64 bytes 63+1 = string ; warning does not support multibyte char like chinese
71 #define ESP_DHT_TYPE 460 //1 bytes = flag
72 #define ESP_TARGET_FW 461 //1 bytes = flag
73 #define ESP_TIMEZONE 462 //1 bytes = flag
74 #define ESP_TIME_IS_DST 463 //1 bytes = flag
75 #define ESP_TIME_SERVER1 464 //129 bytes 128+1 = string ; warning does not support multibyte char like chinese
76 #define ESP_TIME_SERVER2 593 //129 bytes 128+1 = string ; warning does not support multibyte char like chinese
77 #define ESP_TIME_SERVER3 722 //129 bytes 128+1 = string ; warning does not support multibyte char like chinese
78 #define ESP_SD_DEVICE_TYPE 850 //1 bytes = flag
79 #define ESP_SD_MOUNT 851 //1 bytes = flag
80 #define ESP_FREE_BYTE 852 //1 bytes = flag
81 #define ESP_DIRECT_SD_CHECK 853 //1 bytes = flag
82 #define ESP_SD_CHECK_UPDATE_AT_BOOT 854//1 bytes = flag
83 #define ESP_NOTIFICATION_SETTINGS 855 //128 bytes 127+1 = string ; warning does not support multibyte char like chinese
84 #define ESP_CALIBRATION_1 983 //4 bytes = int
85 #define ESP_CALIBRATION_2 987 //4 bytes = int
86 #define ESP_CALIBRATION_3 991 //4 bytes = int
87 #define ESP_CALIBRATION_4 995 //4 bytes = int
88 #define ESP_CALIBRATION_5 999 //4 bytes = int
89 #define ESP_AUTO_NOTIFICATION 1004 //1 byte = flag
90 #define ESP_CAMERA_PORT 1005 //4 bytes = int
91 #define ESP_FTP_CTRL_PORT 1009 //4 bytes = int
92 #define ESP_FTP_DATA_ACTIVE_PORT 1013 //4 bytes = int
93 #define ESP_FTP_DATA_PASSIVE_PORT 1017 //4 bytes = int
94 #define ESP_FTP_ON 1021 //1 byte = flag
97 #define HIDDEN_PASSWORD "********"
118 static uint8_t
read_byte (
int pos,
bool * haserror = NULL);
119 static uint32_t
read_uint32(
int pos,
bool * haserror = NULL);
120 static uint32_t
read_IP(
int pos,
bool * haserror = NULL);
122 static const char *
read_string (
int pos,
bool *haserror = NULL);
123 static bool write_byte (
int pos,
const uint8_t value);
124 static bool write_string (
int pos,
const char * byte_buffer);
125 static bool write_uint32 (
int pos,
const uint32_t value);
126 static bool write_IP (
int pos,
const uint32_t value);
131 static uint8_t
GetSDDevice(
bool fromsettings =
false);
138 static bool is_string(
const char * s, uint len);
139 static uint8_t _FirmwareTarget;
140 static bool _SDdevice;
144 #endif //_SETTINGS_ESP3D_H
static bool write_byte(int pos, const uint8_t value)
static const char * read_string(int pos, bool *haserror=NULL)
static bool isLocalPasswordValid(const char *password)
static uint32_t get_default_int32_value(int pos)
static uint32_t get_max_int32_value(int pos)
static uint8_t get_default_byte_value(int pos)
static int8_t GetSettingsVersion()
static const String & get_default_string_value(int pos)
static uint8_t GetSDDevice(bool fromsettings=false)
static bool write_uint32(int pos, const uint32_t value)
static uint8_t GetFirmwareTarget(bool fromsettings=false)
static uint8_t get_min_string_size(int pos)
static const char * GetFirmwareTargetShortName()
static bool write_IP(int pos, const uint32_t value)
static uint32_t read_IP(int pos, bool *haserror=NULL)
static uint32_t get_min_int32_value(int pos)
static bool write_string(int pos, const char *byte_buffer)
static uint8_t get_max_byte(int pos)
static uint32_t read_uint32(int pos, bool *haserror=NULL)
static uint32_t get_default_IP_value(int pos)
static uint8_t get_max_string_size(int pos)
static const char * TargetBoard()
static uint8_t read_byte(int pos, bool *haserror=NULL)
static bool write_IP_String(int pos, const char *value)
static uint8_t get_min_byte(int pos)
static String IPtoString(uint32_t ip_int)
static String read_IP_String(int pos, bool *haserror=NULL)
static uint32_t StringtoIP(const char *s)