Merge pull request #102 from airgradienthq/hotfix/led-button-test-not-handle-on-power-up

fix led bar button test not work on power up
This commit is contained in:
Phat Nguyen
2024-05-03 21:03:15 +07:00
committed by GitHub
4 changed files with 14 additions and 1 deletions

View File

@ -319,6 +319,10 @@ void StateMachine::ledBarTest(void) {
}
}
void StateMachine::ledBarPowerUpTest(void) {
ledBarRunTest();
}
void StateMachine::ledBarRunTest(void) {
disp.setText("LED Test", "running", ".....");
runLedTest('r');
@ -699,6 +703,8 @@ void StateMachine::handleLeds(AgStateMachineState state) {
case AgStateMachineLedBarTest:
ledBarTest();
break;
case AgStateMachineLedBarPowerUpTest:
ledBarPowerUpTest();
default:
break;
}
@ -752,3 +758,7 @@ void StateMachine::executeCo2Calibration(void) {
void StateMachine::executeLedBarTest(void) {
handleLeds(AgStateMachineLedBarTest);
}
void StateMachine::executeLedBarPowerUpTest(void) {
handleLeds(AgStateMachineLedBarPowerUpTest);
}