From 040d4c6ba2edbd3e222a1a66899e4d3e65c39ef2 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sat, 13 Oct 2018 20:38:48 +0200 Subject: [PATCH 1/4] 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/4] 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; From c46ae740673f7c6cfd8e6c0c58c4d2be37943041 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 14 Oct 2018 12:53:11 +0200 Subject: [PATCH 3/4] Add whitespace removal Add whitespace removal from RfRaw and SerialSend5 (#4020) --- sonoff/_changelog.ino | 3 ++- sonoff/sonoff.ino | 2 +- sonoff/support.ino | 16 ++++++++++++++++ sonoff/xdrv_06_snfbridge.ino | 20 +------------------- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 0cd2d3093..9a81d11bd 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,6 +1,7 @@ /* 6.2.1.15 20181012 - * Fix Color Temperature slider functionality regression from 20180726 (#4037) + * Fix Color Temperature slider functionality regression from 6.2.1.5 (#4037) * Add auto reload of main web page to some web restarts + * Add whitespace removal from RfRaw and SerialSend5 (#4020) * * 6.2.1.14 20181010 * Rewrite Webserver page handler for easier extension (thx to Adrian Scillato) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index d9453e3c4..ca42c2bbf 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -1002,7 +1002,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) Serial.printf("%s", Unescape(dataBuf, &dat_len)); // "Hello\f" } else if (5 == index) { - SerialSendRaw(dataBuf, data_len); // "AA004566" + SerialSendRaw(RemoveSpace(dataBuf), strlen(dataBuf)); // "AA004566" } snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, D_JSON_DONE); } diff --git a/sonoff/support.ino b/sonoff/support.ino index faf651e96..a81699a8c 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -243,6 +243,22 @@ char* Unescape(char* buffer, uint16_t* size) return buffer; } +char* RemoveSpace(char* p) +{ + char* write = p; + char* read = p; + char ch = '.'; + + while (ch != '\0') { + ch = *read++; + if (!isspace(ch)) { + *write++ = ch; + } + } + *write = '\0'; + return p; +} + char* UpperCase(char* dest, const char* source) { char* write = dest; diff --git a/sonoff/xdrv_06_snfbridge.ino b/sonoff/xdrv_06_snfbridge.ino index caf67186b..0533e2d4a 100644 --- a/sonoff/xdrv_06_snfbridge.ino +++ b/sonoff/xdrv_06_snfbridge.ino @@ -411,22 +411,6 @@ 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: Sun, 14 Oct 2018 13:18:16 +0200 Subject: [PATCH 4/4] decode-config.py v1.5.0013: add dev settings 6.2.1.14 & 6.2.1.15 - clean-up settings using diffs --- tools/decode-config.py | 2713 ++++++---------------------------------- 1 file changed, 413 insertions(+), 2300 deletions(-) diff --git a/tools/decode-config.py b/tools/decode-config.py index 258a8accd..c3d4af9b3 100644 --- a/tools/decode-config.py +++ b/tools/decode-config.py @@ -1,7 +1,7 @@ #!/usr/bin/env python #!/usr/bin/env python # -*- coding: utf-8 -*- -VER = '1.5.0012' +VER = '1.5.0013' """ decode-config.py - Decode configuration of Sonoff-Tasmota device @@ -238,2304 +238,6 @@ def password(value): return '********' return value - -Setting_6_2_1_10 = { - 'cfg_holder': ('