forked from airgradienthq/arduino
Remove country dependency on LED bar button test
This commit is contained in:
@ -302,25 +302,25 @@ void StateMachine::co2Calibration(void) {
|
|||||||
|
|
||||||
void StateMachine::ledBarTest(void) {
|
void StateMachine::ledBarTest(void) {
|
||||||
if (config.isLedBarTestRequested()) {
|
if (config.isLedBarTestRequested()) {
|
||||||
ledBarPowerUpTest();
|
if (config.getCountry() == "TH") {
|
||||||
|
uint32_t tstart = millis();
|
||||||
|
logInfo("Start run LED test for 2 min");
|
||||||
|
while (1) {
|
||||||
|
ledBarRunTest();
|
||||||
|
uint32_t ms = (uint32_t)(millis() - tstart);
|
||||||
|
if (ms >= (60 * 1000 * 2)) {
|
||||||
|
logInfo("LED test after 2 min finish");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ledBarRunTest();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateMachine::ledBarPowerUpTest(void) {
|
void StateMachine::ledBarPowerUpTest(void) {
|
||||||
if (config.getCountry() == "TH") {
|
ledBarRunTest();
|
||||||
uint32_t tstart = millis();
|
|
||||||
logInfo("Start run LED test for 2 min");
|
|
||||||
while (1) {
|
|
||||||
ledBarRunTest();
|
|
||||||
uint32_t ms = (uint32_t)(millis() - tstart);
|
|
||||||
if (ms >= (60 * 1000 * 2)) {
|
|
||||||
logInfo("LED test after 2 min finish");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ledBarRunTest();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateMachine::ledBarRunTest(void) {
|
void StateMachine::ledBarRunTest(void) {
|
||||||
|
Reference in New Issue
Block a user