mirror of https://github.com/arendst/Tasmota.git
Changed removed leading spaces on commands ``(S)SerialSend1 to 6``
Removed leading spaces on commands ``(S)SerialSend1 to 6`` but keep on duplicate commands ``(S)SerialSend11 to 16`` (#16723)
This commit is contained in:
parent
b4a688f495
commit
e1221b924d
|
@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- TasmotaSerial library from v3.5.0 to v3.6.0
|
- TasmotaSerial library from v3.5.0 to v3.6.0
|
||||||
|
- Removed leading spaces on commands ``(S)SerialSend1 to 6`` but keep on duplicate commands ``(S)SerialSend11 to 16`` (#16723)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- TasmotaSerial ``read(buffer, size)`` regression from v9.3.0
|
- TasmotaSerial ``read(buffer, size)`` regression from v9.3.0
|
||||||
|
|
|
@ -153,6 +153,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
||||||
- WS2812 sends signal to only ``Pixels`` leds instead of sending to 512 leds [#17055](https://github.com/arendst/Tasmota/issues/17055)
|
- WS2812 sends signal to only ``Pixels`` leds instead of sending to 512 leds [#17055](https://github.com/arendst/Tasmota/issues/17055)
|
||||||
- AC PWM dimmer lineair power distribution [#17177](https://github.com/arendst/Tasmota/issues/17177)
|
- AC PWM dimmer lineair power distribution [#17177](https://github.com/arendst/Tasmota/issues/17177)
|
||||||
- Zigbee improved Aqara plug support and completed cluster 0x0702 [#17073](https://github.com/arendst/Tasmota/issues/17073)
|
- Zigbee improved Aqara plug support and completed cluster 0x0702 [#17073](https://github.com/arendst/Tasmota/issues/17073)
|
||||||
|
- Removed leading spaces on commands ``(S)SerialSend1 to 6`` but keep on duplicate commands ``(S)SerialSend11 to 16`` [#16723](https://github.com/arendst/Tasmota/issues/16723
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- TasmotaSerial ``read(buffer, size)`` regression from v9.3.0
|
- TasmotaSerial ``read(buffer, size)`` regression from v9.3.0
|
||||||
|
|
|
@ -412,7 +412,8 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len)
|
||||||
|
|
||||||
bool binary_data = (index > 199); // Suppose binary data on topic index > 199
|
bool binary_data = (index > 199); // Suppose binary data on topic index > 199
|
||||||
if (!binary_data) {
|
if (!binary_data) {
|
||||||
if (strstr_P(type, PSTR("SERIALSEND")) == nullptr) { // Do not skip leading spaces on (s)serialsend
|
bool keep_spaces = ((strstr_P(type, PSTR("SERIALSEND")) != nullptr) && (index > 9)); // Do not skip leading spaces on (s)serialsend10 and up
|
||||||
|
if (!keep_spaces) {
|
||||||
while (*dataBuf && isspace(*dataBuf)) {
|
while (*dataBuf && isspace(*dataBuf)) {
|
||||||
dataBuf++; // Skip leading spaces in data
|
dataBuf++; // Skip leading spaces in data
|
||||||
data_len--;
|
data_len--;
|
||||||
|
@ -1880,8 +1881,8 @@ void CmndSerialBuffer(void) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmndSerialSend(void)
|
void CmndSerialSend(void) {
|
||||||
{
|
if (XdrvMailbox.index > 9) { XdrvMailbox.index -= 10; }
|
||||||
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= 6)) {
|
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= 6)) {
|
||||||
SetSeriallog(LOG_LEVEL_NONE);
|
SetSeriallog(LOG_LEVEL_NONE);
|
||||||
Settings->flag.mqtt_serial = 1; // CMND_SERIALSEND and CMND_SERIALLOG
|
Settings->flag.mqtt_serial = 1; // CMND_SERIALSEND and CMND_SERIALLOG
|
||||||
|
|
|
@ -212,6 +212,7 @@ void SerialBridgeInit(void) {
|
||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
void CmndSSerialSend(void) {
|
void CmndSSerialSend(void) {
|
||||||
|
if (XdrvMailbox.index > 9) { XdrvMailbox.index -= 10; }
|
||||||
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= 6)) {
|
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= 6)) {
|
||||||
serial_bridge_raw = (XdrvMailbox.index > 3);
|
serial_bridge_raw = (XdrvMailbox.index > 3);
|
||||||
Settings->sbflag1.serbridge_console = 0; // Disable console Tee
|
Settings->sbflag1.serbridge_console = 0; // Disable console Tee
|
||||||
|
|
Loading…
Reference in New Issue