diff --git a/code/espurna/relay.ino b/code/espurna/relay.ino index 4ad4d9e6..8e262d3a 100644 --- a/code/espurna/relay.ino +++ b/code/espurna/relay.ino @@ -52,11 +52,6 @@ bool relayStatus(unsigned char id) { #endif } -void relayPulseBack(unsigned char id) { - relayToggle(id); - pulseTicker.detach(); -} - void relayPulse(unsigned char id) { byte relayPulseMode = getSetting("relayPulseMode", RELAY_PULSE_MODE).toInt(); @@ -69,9 +64,9 @@ void relayPulse(unsigned char id) { return; } - pulseTicker.attach( + pulseTicker.once( getSetting("relayPulseTime", RELAY_PULSE_TIME).toInt(), - relayPulseBack, + relayToggle, id );