|
@ -21,9 +21,9 @@ typedef struct { |
|
|
unsigned int scheduledStatusTime; |
|
|
unsigned int scheduledStatusTime; |
|
|
bool scheduledStatus; |
|
|
bool scheduledStatus; |
|
|
bool scheduledReport; |
|
|
bool scheduledReport; |
|
|
|
|
|
Ticker pulseTicker; |
|
|
} relay_t; |
|
|
} relay_t; |
|
|
std::vector<relay_t> _relays; |
|
|
std::vector<relay_t> _relays; |
|
|
Ticker pulseTicker; |
|
|
|
|
|
bool recursive = false; |
|
|
bool recursive = false; |
|
|
|
|
|
|
|
|
#if RELAY_PROVIDER == RELAY_PROVIDER_DUAL
|
|
|
#if RELAY_PROVIDER == RELAY_PROVIDER_DUAL
|
|
@ -105,11 +105,11 @@ void relayPulse(unsigned char id) { |
|
|
bool status = relayStatus(id); |
|
|
bool status = relayStatus(id); |
|
|
bool pulseStatus = (relayPulseMode == RELAY_PULSE_ON); |
|
|
bool pulseStatus = (relayPulseMode == RELAY_PULSE_ON); |
|
|
if (pulseStatus == status) { |
|
|
if (pulseStatus == status) { |
|
|
pulseTicker.detach(); |
|
|
|
|
|
|
|
|
_relays[id].pulseTicker.detach(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
pulseTicker.once( |
|
|
|
|
|
|
|
|
_relays[id].pulseTicker.once( |
|
|
getSetting("relayPulseTime", RELAY_PULSE_TIME).toInt(), |
|
|
getSetting("relayPulseTime", RELAY_PULSE_TIME).toInt(), |
|
|
relayToggle, |
|
|
relayToggle, |
|
|
id |
|
|
id |
|
|