Commit 6baf3b30 authored by Eric Duminil's avatar Eric Duminil
Browse files

Almost done with sensor commands

parent 579440cb
......@@ -80,6 +80,7 @@ namespace sensor {
sensor_commands::defineCallback("reset", []() {
ESP.restart();
}, " (Restarts the sensor)");
sensor_commands::defineCallback("night_mode", led_effects::toggleNightMode, " (Toggles night mode on/off)");
}
//NOTE: should timer deviation be used to adjust measurement_timestep?
......
......@@ -118,15 +118,6 @@ namespace csv_writer {
Serial.println();
sensor_commands::defineIntCallback("csv", setCSVinterval, " 60 (Sets CSV writing interval, in s)");
sensor_commands::defineIntCallback("double", [](int32_t x) {
Serial.print("2 * ");
Serial.print(x);
Serial.print(" = ");
Serial.println(2 * x);
}, " (Say Hello;)");
sensor_commands::defineCallback("hello", []() {
Serial.println("SAY HELLO");
}, " (Say Hello;)");
sensor_commands::defineCallback("format_filesystem", formatFilesystem, " (Deletes the whole filesystem)");
}
......
......@@ -84,13 +84,6 @@ namespace mqtt {
sensor_commands::run(messageString.c_str());
delay(50);
led_effects::onBoardLEDOff();
return;
//TODO: Move this logic to a separate class, which could be used by Serial/MQTT/WebServer
if (messageString == "night_mode") {
led_effects::toggleNightMode();
}
}
void reconnect() {
......
......@@ -99,6 +99,7 @@ namespace sensor_commands {
Serial.println(")");
callbacks[i].intFunction(argument);
} else {
Serial.println();
callbacks[i].voidFunction();
}
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment