From 5aa7d08c91f88943c2052ba9587e5a2102ad605e Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 23 Feb 2025 13:54:39 +0100 Subject: [PATCH] Fix too many zeros in RCSwitch received data regression from v14.4.1.4 (#23050) --- CHANGELOG.md | 1 + RELEASENOTES.md | 1 + tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8163d37f9..fe45ea07e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. - Leds Panel add checkbox to enable/disable the feature (in the iterim for a better solution) (#23048) ### Fixed +- Too many zeros in RCSwitch received data regression from v14.4.1.4 (#23050) ### Removed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index efd737d7d..27d27b140 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -128,5 +128,6 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Leds Panel add checkbox to enable/disable the feature (in the iterim for a better solution) [#23048](https://github.com/arendst/Tasmota/issues/23048) ### Fixed +- Too many zeros in RCSwitch received data regression from v14.4.1.4 [#23050](https://github.com/arendst/Tasmota/issues/23050) ### Removed diff --git a/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino b/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino index 008bfb5b1..ed1025591 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino @@ -56,7 +56,7 @@ void RfReceiveCheck(void) { int protocol = mySwitch.getReceivedProtocol(); int delay = mySwitch.getReceivedDelay(); - AddLog(LOG_LEVEL_DEBUG, PSTR("RFR: Data 0x%_X (%_U), Bits %d, Protocol %d, Delay %d"), &data, &data, bits, protocol, delay); + AddLog(LOG_LEVEL_DEBUG, PSTR("RFR: Data 0x%0_X (%_U), Bits %d, Protocol %d, Delay %d"), &data, &data, bits, protocol, delay); uint32_t now = millis(); if ((now - rf_lasttime > Settings->rf_duplicate_time) && (data > 0)) { @@ -66,7 +66,7 @@ void RfReceiveCheck(void) { if (Settings->flag.rf_receive_decimal) { // SetOption28 - RF receive data format (0 = hexadecimal, 1 = decimal) ext_snprintf_P(stemp, sizeof(stemp), PSTR("%_U"), &data); } else { - ext_snprintf_P(stemp, sizeof(stemp), PSTR("\"0x%_X\""), &data); + ext_snprintf_P(stemp, sizeof(stemp), PSTR("\"0x%0_X\""), &data); } ResponseTime_P(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);