mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-13 15:37:03 +00:00
Merge branch 'master' into dev-v2.1.0
This commit is contained in:
commit
0af2378d05
@ -213,7 +213,7 @@ void setup() {
|
||||
}
|
||||
|
||||
DebugConfig debug;
|
||||
if(config.getDebugConfig(debug)) {
|
||||
if(config.getDebugConfig(debug) && (debug.serial || debug.telnet)) {
|
||||
Debug.setSerialEnabled(debug.serial);
|
||||
}
|
||||
#if DEBUG_MODE
|
||||
@ -391,6 +391,7 @@ void loop() {
|
||||
longPressActive = false;
|
||||
} else {
|
||||
// Single press action
|
||||
debugD("Button was clicked, no action configured");
|
||||
}
|
||||
buttonActive = false;
|
||||
}
|
||||
@ -415,12 +416,14 @@ void loop() {
|
||||
Debug.setPassword(web.password);
|
||||
}
|
||||
DebugConfig debug;
|
||||
if(config.getDebugConfig(debug)) {
|
||||
if(config.getDebugConfig(debug) && (debug.serial || debug.telnet)) {
|
||||
Debug.begin(wifi.hostname, (uint8_t) debug.level);
|
||||
Debug.setSerialEnabled(debug.serial);
|
||||
if(!debug.telnet) {
|
||||
Debug.stop();
|
||||
}
|
||||
} else {
|
||||
Debug.stop();
|
||||
}
|
||||
if(Debug.isActive(RemoteDebug::INFO)) {
|
||||
debugI("Successfully connected to WiFi!");
|
||||
|
||||
@ -1288,18 +1288,22 @@ void AmsWebServer::handleSave() {
|
||||
debug.level = server.arg("debugLevel").toInt();
|
||||
|
||||
debugger->stop();
|
||||
if(webConfig.security > 0) {
|
||||
debugger->setPassword(webConfig.password);
|
||||
} else {
|
||||
debugger->setPassword("");
|
||||
}
|
||||
debugger->setSerialEnabled(debug.serial);
|
||||
WiFiConfig wifi;
|
||||
if(config->getWiFiConfig(wifi) && strlen(wifi.hostname) > 0) {
|
||||
debugger->begin(wifi.hostname, (uint8_t) debug.level);
|
||||
if(!debug.telnet) {
|
||||
debugger->stop();
|
||||
if(debug.telnet || debug.serial) {
|
||||
if(webConfig.security > 0) {
|
||||
debugger->setPassword(webConfig.password);
|
||||
} else {
|
||||
debugger->setPassword("");
|
||||
}
|
||||
debugger->setSerialEnabled(debug.serial);
|
||||
WiFiConfig wifi;
|
||||
if(config->getWiFiConfig(wifi) && strlen(wifi.hostname) > 0) {
|
||||
debugger->begin(wifi.hostname, (uint8_t) debug.level);
|
||||
if(!debug.telnet) {
|
||||
debugger->stop();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
debugger->stop();
|
||||
}
|
||||
config->setDebugConfig(debug);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user