Merge branch 'arendst/development' into development

This commit is contained in:
reloxx13 2018-10-14 18:38:32 +02:00
commit 2d2c5bb3f6
5 changed files with 433 additions and 2304 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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;

View File

@ -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;
}

File diff suppressed because it is too large Load Diff