Add serial log levels
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "alarms.h"
|
||||
#include "system_status.h"
|
||||
#include "app_config.h"
|
||||
#include "logger.h"
|
||||
|
||||
WebServer server(80);
|
||||
HardwareSerial DashboardSerial(2);
|
||||
@@ -303,6 +304,24 @@ void handleDebugSerial() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (command == "log quiet") {
|
||||
setLogLevel(LOG_QUIET);
|
||||
Serial.println("OK log level quiet");
|
||||
return;
|
||||
}
|
||||
|
||||
if (command == "log info") {
|
||||
setLogLevel(LOG_INFO);
|
||||
Serial.println("OK log level info");
|
||||
return;
|
||||
}
|
||||
|
||||
if (command == "log debug") {
|
||||
setLogLevel(LOG_DEBUG);
|
||||
Serial.println("OK log level debug");
|
||||
return;
|
||||
}
|
||||
|
||||
if (command == "factory reset") {
|
||||
factoryResetConfig();
|
||||
Serial.println("OK factory reset complete");
|
||||
@@ -702,6 +721,6 @@ void loop() {
|
||||
if (millis() - lastSensorUpdate > 5000) {
|
||||
updateSensors();
|
||||
lastSensorUpdate = millis();
|
||||
Serial.println("Sensor Update");
|
||||
logDebug("Sensor Update");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user