File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
examples/utility/Provisioning_2.0 Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -97,14 +97,18 @@ void sendStatus(StatusMessage msg) {
97
97
uint32_t lastLedStatusChanged = 0 ;
98
98
bool ledactive = false ;
99
99
DeviceState handleOptaTest () {
100
-
101
- if (millis () - lastLedStatusChanged > 250 ){
102
- lastLedStatusChanged = millis ();
103
- ledactive = !ledactive;
104
- digitalWrite (LEDG, ledactive);
100
+ bool running = OptaFactoryTest.poll ();
101
+ if (!running){
102
+ digitalWrite (LEDG, LOW);
103
+ digitalWrite (LEDR, HIGH);
104
+ } else {
105
+ if (millis () - lastLedStatusChanged > 250 ){
106
+ lastLedStatusChanged = millis ();
107
+ ledactive = !ledactive;
108
+ digitalWrite (LEDG, ledactive);
109
+ }
105
110
}
106
111
107
- OptaFactoryTest.poll ();
108
112
return DeviceState::OPTA_TEST;
109
113
}
110
114
#endif
You can’t perform that action at this time.
0 commit comments