mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-27 23:47:16 +02:00
Add new flag for command request
Such as led bar test and co2 calibration test
This commit is contained in:
@ -370,6 +370,12 @@ void loop() {
|
||||
|
||||
/** factory reset handle */
|
||||
factoryConfigReset();
|
||||
|
||||
if (configuration.isCommandRequested()) {
|
||||
// Each state machine already has an independent request command check
|
||||
stateMachine.executeCo2Calibration();
|
||||
stateMachine.executeLedBarTest();
|
||||
}
|
||||
}
|
||||
|
||||
static void co2Update(void) {
|
||||
@ -1082,10 +1088,6 @@ static void configUpdateHandle() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (configuration.isCo2CalibrationRequested()) {
|
||||
stateMachine.executeCo2Calibration();
|
||||
}
|
||||
|
||||
String mqttUri = configuration.getMqttBrokerUri();
|
||||
if (mqttClient.isCurrentUri(mqttUri) == false) {
|
||||
mqttClient.end();
|
||||
@ -1157,11 +1159,6 @@ static void configUpdateHandle() {
|
||||
if (configuration.isDisplayBrightnessChanged()) {
|
||||
oledDisplay.setBrightness(configuration.getDisplayBrightness());
|
||||
}
|
||||
|
||||
stateMachine.executeLedBarTest();
|
||||
}
|
||||
else if(ag->isOpenAir()) {
|
||||
stateMachine.executeLedBarTest();
|
||||
}
|
||||
|
||||
// Update display and led bar notification based on updated configuration
|
||||
|
Reference in New Issue
Block a user