Commit 08d9755a authored by Eric Duminil's avatar Eric Duminil
Browse files

Small refactor

parent 082bc7a1
Pipeline #2835 passed with stage
in 1 minute and 40 seconds
......@@ -39,5 +39,6 @@
void keepServicesAlive();
void checkFlashButton();
void checkSerialInput();
#endif
......@@ -145,9 +145,7 @@ void loop() {
// Short press for night mode, Long press for calibration.
checkFlashButton();
while (Serial.available() > 0) {
sensor_console::processSerialInput(Serial.read());
}
checkSerialInput();
if (sensor::processData()) {
#ifdef AMPEL_CSV
......@@ -172,6 +170,12 @@ void loop() {
}
}
void checkSerialInput() {
while (Serial.available() > 0) {
sensor_console::processSerialInput(Serial.read());
}
}
/**
* Checks if flash button has been pressed:
* If not, do nothing.
......
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