From 8dbfa7d6b539869835685563c62b1f8e1ba11386 Mon Sep 17 00:00:00 2001 From: "he.so" Date: Wed, 26 Feb 2020 19:46:44 +0100 Subject: [PATCH] fixed repeated sending of code --- tasmota/xdrv_35_keeloq.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasmota/xdrv_35_keeloq.ino b/tasmota/xdrv_35_keeloq.ino index c1fec39fe..ce6185923 100644 --- a/tasmota/xdrv_35_keeloq.ino +++ b/tasmota/xdrv_35_keeloq.ino @@ -113,14 +113,15 @@ void CmdSendButton(void) for(int repeat = 0; repeat <= 1; repeat++) { - digitalWrite(TX_PORT, LOW); // CC1101 in TX Mode+ + uint64_t bitsToSend = jaroliftDevice.pack; + digitalWrite(TX_PORT, LOW); delayMicroseconds(1150); SendSyncPreamble(13); delayMicroseconds(3500); for(int i=72; i>0; i--) { - SendBit(jaroliftDevice.pack & 0x0000000000000001); - jaroliftDevice.pack >>= 1; + SendBit(bitsToSend & 0x0000000000000001); + bitsToSend >>= 1; } DEBUG_DRIVER_LOG(LOG_LEVEL_DEBUG_MORE, PSTR("finished sending bits at %d"), micros());