mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-13 11:44:29 +05:00
refactor: added defaults for serial & telnet
This commit is contained in:
@@ -35,8 +35,10 @@ build_flags =
|
|||||||
;-D DEBUG_ESP_CORE -D DEBUG_ESP_WIFI -D DEBUG_ESP_HTTP_SERVER -D DEBUG_ESP_PORT=Serial
|
;-D DEBUG_ESP_CORE -D DEBUG_ESP_WIFI -D DEBUG_ESP_HTTP_SERVER -D DEBUG_ESP_PORT=Serial
|
||||||
-D BUILD_VERSION='"${this.version}"'
|
-D BUILD_VERSION='"${this.version}"'
|
||||||
-D BUILD_ENV='"$PIOENV"'
|
-D BUILD_ENV='"$PIOENV"'
|
||||||
-D USE_SERIAL=${secrets.use_serial}
|
-D DEFAULT_SERIAL_ENABLE=${secrets.serial_enable}
|
||||||
-D USE_TELNET=${secrets.use_telnet}
|
-D DEFAULT_SERIAL_BAUD=${secrets.serial_baud}
|
||||||
|
-D DEFAULT_TELNET_ENABLE=${secrets.telnet_enable}
|
||||||
|
-D DEFAULT_TELNET_PORT=${secrets.telnet_port}
|
||||||
-D DEFAULT_LOG_LEVEL=${secrets.log_level}
|
-D DEFAULT_LOG_LEVEL=${secrets.log_level}
|
||||||
-D DEFAULT_HOSTNAME='"${secrets.hostname}"'
|
-D DEFAULT_HOSTNAME='"${secrets.hostname}"'
|
||||||
-D DEFAULT_AP_SSID='"${secrets.ap_ssid}"'
|
-D DEFAULT_AP_SSID='"${secrets.ap_ssid}"'
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
[secrets]
|
[secrets]
|
||||||
use_serial = true
|
serial_enable = true
|
||||||
use_telnet = true
|
serial_baud = 115200
|
||||||
|
telnet_enable = true
|
||||||
|
telnet_port = 23
|
||||||
log_level = 5
|
log_level = 5
|
||||||
hostname = opentherm
|
hostname = opentherm
|
||||||
|
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ struct Settings {
|
|||||||
uint8_t logLevel = DEFAULT_LOG_LEVEL;
|
uint8_t logLevel = DEFAULT_LOG_LEVEL;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
bool enable = USE_SERIAL;
|
bool enable = DEFAULT_SERIAL_ENABLE;
|
||||||
unsigned int baudrate = 115200;
|
unsigned int baudrate = DEFAULT_SERIAL_BAUD;
|
||||||
} serial;
|
} serial;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
bool enable = USE_TELNET;
|
bool enable = DEFAULT_TELNET_ENABLE;
|
||||||
unsigned short port = 23;
|
unsigned short port = DEFAULT_TELNET_PORT;
|
||||||
} telnet;
|
} telnet;
|
||||||
|
|
||||||
UnitSystem unitSystem = UnitSystem::METRIC;
|
UnitSystem unitSystem = UnitSystem::METRIC;
|
||||||
|
|||||||
@@ -30,12 +30,20 @@
|
|||||||
#define BUILD_ENV "undefined"
|
#define BUILD_ENV "undefined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE_SERIAL
|
#ifndef DEFAULT_SERIAL_ENABLE
|
||||||
#define USE_SERIAL true
|
#define DEFAULT_SERIAL_ENABLE true
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE_TELNET
|
#ifndef DEFAULT_SERIAL_BAUD
|
||||||
#define USE_TELNET true
|
#define DEFAULT_SERIAL_BAUD 115200
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DEFAULT_TELNET_ENABLE
|
||||||
|
#define DEFAULT_TELNET_ENABLE true
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DEFAULT_TELNET_PORT
|
||||||
|
#define DEFAULT_TELNET_PORT 23
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE_BLE
|
#ifndef USE_BLE
|
||||||
|
|||||||
Reference in New Issue
Block a user