From f5871c0a4b969d0cf4be7a8d8998da4b644107ac Mon Sep 17 00:00:00 2001 From: Josef Reisinger Date: Sun, 29 Nov 2020 15:23:47 +0100 Subject: [PATCH] Enable payload of >32 bit length --- tasmota/xdrv_17_rcswitch.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/xdrv_17_rcswitch.ino b/tasmota/xdrv_17_rcswitch.ino index d676b7530..067e3f457 100644 --- a/tasmota/xdrv_17_rcswitch.ino +++ b/tasmota/xdrv_17_rcswitch.ino @@ -98,7 +98,7 @@ void CmndRfSend(void) bool error = false; if (XdrvMailbox.data_len) { - unsigned long data = 0; + unsigned long long data = 0; // unsigned long long => support payload >32bit unsigned int bits = 24; int protocol = 1; int repeat = 10; @@ -109,7 +109,7 @@ void CmndRfSend(void) if (root) { // RFsend {"data":0x501014,"bits":24,"protocol":1,"repeat":10,"pulse":350} char parm_uc[10]; - data = root.getUInt(PSTR(D_JSON_RF_DATA), data); + data = root.getULong(PSTR(D_JSON_RF_DATA), data); // read payload data even >32bit bits = root.getUInt(PSTR(D_JSON_RF_BITS), bits); protocol = root.getInt(PSTR(D_JSON_RF_PROTOCOL), protocol); repeat = root.getInt(PSTR(D_JSON_RF_REPEAT), repeat);