mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-01 02:52:02 +08:00
Fix ESP400 out whith time zone
Add external config file option for SSID/Password
This commit is contained in:
parent
1dfe95f0a0
commit
26fef41f73
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@ embedded/dist
|
|||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
.vscode/arduino.json
|
.vscode/arduino.json
|
||||||
|
esp3d/myconfig.h
|
||||||
|
@ -26,6 +26,13 @@
|
|||||||
//Note: need both defined to enable it
|
//Note: need both defined to enable it
|
||||||
//#define STATION_WIFI_SSID "*********"
|
//#define STATION_WIFI_SSID "*********"
|
||||||
//#define STATION_WIFI_PASSWORD "*********"
|
//#define STATION_WIFI_PASSWORD "*********"
|
||||||
|
//you can also use a different config file for SSID/password
|
||||||
|
//this file is ignored by github
|
||||||
|
#if defined __has_include
|
||||||
|
# if __has_include ("myconfig.h")
|
||||||
|
# include "myconfig.h"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
//SERIAL_COMMAND_FEATURE: allow to send command by serial
|
//SERIAL_COMMAND_FEATURE: allow to send command by serial
|
||||||
#define SERIAL_COMMAND_FEATURE
|
#define SERIAL_COMMAND_FEATURE
|
||||||
|
@ -285,7 +285,7 @@ bool Commands::ESP400(const char* cmd_params, level_authenticate_type auth_type,
|
|||||||
output->print ((int8_t)Settings_ESP3D::read_byte(ESP_TIMEZONE));
|
output->print ((int8_t)Settings_ESP3D::read_byte(ESP_TIMEZONE));
|
||||||
output->print("\",\"H\":\"tzone\",\"O\":[");
|
output->print("\",\"H\":\"tzone\",\"O\":[");
|
||||||
for (int8_t i = Settings_ESP3D::get_min_byte(ESP_TIMEZONE); i <= Settings_ESP3D::get_max_byte(ESP_TIMEZONE) ; i++) {
|
for (int8_t i = Settings_ESP3D::get_min_byte(ESP_TIMEZONE); i <= Settings_ESP3D::get_max_byte(ESP_TIMEZONE) ; i++) {
|
||||||
if (i > 1) {
|
if (i > Settings_ESP3D::get_min_byte(ESP_TIMEZONE)) {
|
||||||
output->print (",");
|
output->print (",");
|
||||||
}
|
}
|
||||||
output->printf("{\"%d\":\"%d\"}", i, i);
|
output->printf("{\"%d\":\"%d\"}", i, i);
|
||||||
|
@ -533,7 +533,7 @@ uint8_t Settings_ESP3D::get_max_byte(int pos)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t Settings_ESP3D::get_min_byte(int pos)
|
int8_t Settings_ESP3D::get_min_byte(int pos)
|
||||||
{
|
{
|
||||||
uint8_t res;
|
uint8_t res;
|
||||||
switch(pos) {
|
switch(pos) {
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
static uint32_t get_max_int32_value(int pos);
|
static uint32_t get_max_int32_value(int pos);
|
||||||
static uint32_t get_min_int32_value(int pos);
|
static uint32_t get_min_int32_value(int pos);
|
||||||
static uint8_t get_max_byte(int pos);
|
static uint8_t get_max_byte(int pos);
|
||||||
static uint8_t get_min_byte(int pos);
|
static int8_t get_min_byte(int pos);
|
||||||
static uint8_t read_byte (int pos, bool * haserror = NULL);
|
static uint8_t read_byte (int pos, bool * haserror = NULL);
|
||||||
static uint32_t read_uint32(int pos, bool * haserror = NULL);
|
static uint32_t read_uint32(int pos, bool * haserror = NULL);
|
||||||
static uint32_t read_IP(int pos, bool * haserror = NULL);
|
static uint32_t read_IP(int pos, bool * haserror = NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user