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) {
9797uint32_t lastLedStatusChanged = 0 ;
9898bool ledactive = false ;
9999DeviceState 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+ }
105110 }
106111
107- OptaFactoryTest.poll ();
108112 return DeviceState::OPTA_TEST;
109113}
110114#endif
You can’t perform that action at this time.
0 commit comments