[ONOFF] Set power indicator status at start (#1456)
So that it reflects the real state of the relay even if a restart of the board was done
This commit is contained in:
1 parent
df8943bf52
commit
b7e0872f05
1 file changed
+5
@@ -38,6 +38,11 @@ void setupONOFF() {
|
||||
xTaskCreate(overLimitTemp, "overLimitTemp", 2500, NULL, 10, NULL);
|
||||
# endif
|
||||
pinMode(ACTUATOR_ONOFF_GPIO, OUTPUT);
|
||||
if (digitalRead(ACTUATOR_ONOFF_GPIO) == ACTUATOR_ON) {
|
||||
PowerIndicatorON();
|
||||
} else {
|
||||
PowerIndicatorOFF();
|
||||
}
|
||||
# ifdef ACTUATOR_ONOFF_DEFAULT
|
||||
digitalWrite(ACTUATOR_ONOFF_GPIO, ACTUATOR_ONOFF_DEFAULT);
|
||||
# endif
|
||||
|
||||
Reference in new issue
Block a user