mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 13:16:32 +00:00
fixed repeated sending of code
This commit is contained in:
parent
bc584468af
commit
8dbfa7d6b5
@ -113,14 +113,15 @@ void CmdSendButton(void)
|
|||||||
|
|
||||||
for(int repeat = 0; repeat <= 1; repeat++)
|
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);
|
delayMicroseconds(1150);
|
||||||
SendSyncPreamble(13);
|
SendSyncPreamble(13);
|
||||||
delayMicroseconds(3500);
|
delayMicroseconds(3500);
|
||||||
for(int i=72; i>0; i--)
|
for(int i=72; i>0; i--)
|
||||||
{
|
{
|
||||||
SendBit(jaroliftDevice.pack & 0x0000000000000001);
|
SendBit(bitsToSend & 0x0000000000000001);
|
||||||
jaroliftDevice.pack >>= 1;
|
bitsToSend >>= 1;
|
||||||
}
|
}
|
||||||
DEBUG_DRIVER_LOG(LOG_LEVEL_DEBUG_MORE, PSTR("finished sending bits at %d"), micros());
|
DEBUG_DRIVER_LOG(LOG_LEVEL_DEBUG_MORE, PSTR("finished sending bits at %d"), micros());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user