From 040d4c6ba2edbd3e222a1a66899e4d3e65c39ef2 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sat, 13 Oct 2018 20:38:48 +0200 Subject: [PATCH 1/2] xdrv_06_snfbridge: Remove whitespace from RfRaw --- sonoff/xdrv_06_snfbridge.ino | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sonoff/xdrv_06_snfbridge.ino b/sonoff/xdrv_06_snfbridge.ino index 379d29455..8ce639c46 100644 --- a/sonoff/xdrv_06_snfbridge.ino +++ b/sonoff/xdrv_06_snfbridge.ino @@ -411,6 +411,22 @@ void SonoffBridgeLearn(uint8_t key) Serial.write(0x55); // End of Text } +char* charclean(char *in) +{ + uint8_t i; + uint8_t x; + char *out = in; + for (i=0,x=0;i Date: Sat, 13 Oct 2018 20:46:17 +0200 Subject: [PATCH 2/2] Update xdrv_06_snfbridge.ino --- sonoff/xdrv_06_snfbridge.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xdrv_06_snfbridge.ino b/sonoff/xdrv_06_snfbridge.ino index 8ce639c46..caf67186b 100644 --- a/sonoff/xdrv_06_snfbridge.ino +++ b/sonoff/xdrv_06_snfbridge.ino @@ -557,7 +557,7 @@ boolean SonoffBridgeCommand() break; } } else { - char rawsend[XdrvMailbox.data_len]; + char rawsend[XdrvMailbox.data_len+1]; sprintf(rawsend,"%s",charclean(XdrvMailbox.data)); SerialSendRaw(rawsend, strlen(rawsend)); sonoff_bridge_receive_raw_flag = 1;