From 2a2b224a24367d21f1a24063d501799099f930d2 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 11 Nov 2018 14:45:19 +0100 Subject: [PATCH] Add pulse time to received JSON Add pulse time to received JSON message in RcSwitch driver (#2702) --- sonoff/xdrv_17_rcswitch.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonoff/xdrv_17_rcswitch.ino b/sonoff/xdrv_17_rcswitch.ino index 701b8c119..82ce95096 100644 --- a/sonoff/xdrv_17_rcswitch.ino +++ b/sonoff/xdrv_17_rcswitch.ino @@ -36,7 +36,7 @@ RCSwitch mySwitch = RCSwitch(); -#define RF_TIME_AVOID_DUPLICATE 1000 // Milliseconds +#define RF_TIME_AVOID_DUPLICATE 1000 // Milliseconds uint32_t rf_lasttime = 0; @@ -62,8 +62,8 @@ void RfReceiveCheck() } else { snprintf_P(stemp, sizeof(stemp), PSTR("\"%lX\""), (uint32_t)data); } - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_RFRECEIVED "\":{\"" D_JSON_RF_DATA "\":%s,\"" D_JSON_RF_BITS "\":%d,\"" D_JSON_RF_PROTOCOL "\":%d}}"), - stemp, bits, protocol); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_RFRECEIVED "\":{\"" D_JSON_RF_DATA "\":%s,\"" D_JSON_RF_BITS "\":%d,\"" D_JSON_RF_PROTOCOL "\":%d,\"" D_JSON_RF_PULSE "\":%d}}"), + stemp, bits, protocol, delay); MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_RFRECEIVED)); XdrvRulesProcess(); #ifdef USE_DOMOTICZ