diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 062f22a99..985b1b930 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,5 @@ /* 6.1.1c + * Add command SerialSend4 to send binary serial data (#3345) * Add rule triggers Wifi#Connected and Wifi#Disconnected (#3359) * Fix unsecure main webpage update * Add Turkish language file (#3332) diff --git a/sonoff/settings.h b/sonoff/settings.h index 1428c9fd4..c76c1703b 100644 --- a/sonoff/settings.h +++ b/sonoff/settings.h @@ -48,7 +48,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t not_power_linked : 1; // bit 20 (v5.11.1f) uint32_t no_power_on_check : 1; // bit 21 (v5.11.1i) uint32_t mqtt_serial : 1; // bit 22 (v5.12.0f) - uint32_t mqtt_serial_raw : 1; // bit 23 (vTDB) + uint32_t mqtt_serial_raw : 1; // bit 23 (v6.1.1c) uint32_t rules_once : 1; // bit 24 (v5.12.0k) - free since v5.14.0b uint32_t knx_enabled : 1; // bit 25 (v5.12.0l) KNX uint32_t device_index_enable : 1; // bit 26 (v5.13.1a) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index a302d65fe..bf286d08b 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -678,6 +678,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) case 7: // mqtt_switch_retain (CMND_SWITCHRETAIN) case 9: // mqtt_sensor_retain (CMND_SENSORRETAIN) case 22: // mqtt_serial (SerialSend and SerialLog) + case 23: // mqtt_serial_raw (SerialSend) case 25: // knx_enabled (Web config) case 27: // knx_enable_enhancement (Web config) ptype = 99; // Command Error @@ -918,14 +919,13 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) else if ((CMND_SERIALSEND == command_code) && (index > 0) && (index <= 4)) { SetSeriallog(LOG_LEVEL_NONE); Settings.flag.mqtt_serial = 1; - Settings.flag.mqtt_serial_raw = (4 == index)?1:0; + Settings.flag.mqtt_serial_raw = (4 == index) ? 1 : 0; if (data_len > 0) { if (1 == index) { Serial.printf("%s\n", dataBuf); } else if (2 == index || 4 == index) { - for (int i=0; i