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 379d29455..0533e2d4a 100644 --- a/sonoff/xdrv_06_snfbridge.ino +++ b/sonoff/xdrv_06_snfbridge.ino @@ -541,7 +541,7 @@ boolean SonoffBridgeCommand() break; } } else { - SerialSendRaw(XdrvMailbox.data, XdrvMailbox.data_len); + SerialSendRaw(RemoveSpace(XdrvMailbox.data), strlen(XdrvMailbox.data)); sonoff_bridge_receive_raw_flag = 1; } } @@ -584,4 +584,3 @@ boolean Xdrv06(byte function) } return result; } - 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': ('