|
@ -552,6 +552,9 @@ void _relayBoot() { |
|
|
|
|
|
|
|
|
void _relayConfigure() { |
|
|
void _relayConfigure() { |
|
|
for (unsigned int i=0; i<_relays.size(); i++) { |
|
|
for (unsigned int i=0; i<_relays.size(); i++) { |
|
|
|
|
|
_relays[i].pulse = getSetting("relayPulse", i, RELAY_PULSE_MODE).toInt(); |
|
|
|
|
|
_relays[i].pulse_ms = 1000 * getSetting("relayTime", i, RELAY_PULSE_MODE).toFloat(); |
|
|
|
|
|
|
|
|
if (GPIO_NONE == _relays[i].pin) continue; |
|
|
if (GPIO_NONE == _relays[i].pin) continue; |
|
|
|
|
|
|
|
|
pinMode(_relays[i].pin, OUTPUT); |
|
|
pinMode(_relays[i].pin, OUTPUT); |
|
@ -562,8 +565,6 @@ void _relayConfigure() { |
|
|
//set to high to block short opening of relay
|
|
|
//set to high to block short opening of relay
|
|
|
digitalWrite(_relays[i].pin, HIGH); |
|
|
digitalWrite(_relays[i].pin, HIGH); |
|
|
} |
|
|
} |
|
|
_relays[i].pulse = getSetting("relayPulse", i, RELAY_PULSE_MODE).toInt(); |
|
|
|
|
|
_relays[i].pulse_ms = 1000 * getSetting("relayTime", i, RELAY_PULSE_MODE).toFloat(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|