diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 72ee17c05..9168f2211 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -6,8 +6,11 @@ For more details go to [emsesp.org](https://emsesp.org/). ## Added +- KM300 at address 0x4A [#3084](https://github.com/emsesp/EMS-ESP32/issues/3084) + ## Fixed - signed value for solarInfuence [#3077](https://github.com/emsesp/EMS-ESP32/issues/3077) +- set bin file upload limit to 1M again [3086](https://github.com/emsesp/EMS-ESP32/issues/3086) ## Changed diff --git a/src/ESP32React/UploadFileService.cpp b/src/ESP32React/UploadFileService.cpp index d600569b6..88786b739 100644 --- a/src/ESP32React/UploadFileService.cpp +++ b/src/ESP32React/UploadFileService.cpp @@ -48,7 +48,7 @@ void UploadFileService::handleUpload(AsyncWebServerRequest * request, const Stri // LittleFS filesystem image _is_filesystem = true; _md5[0] = '\0'; // clear any stale md5 so Update.end() doesn't compare against it - } else if ((extension == "bin") && (filesize > 2000000)) { + } else if ((extension == "bin") && (filesize > 1000000)) { _is_firmware = true; } else if (extension == "json") { _md5[0] = '\0'; // clear md5 diff --git a/src/core/device_library.h b/src/core/device_library.h index 2c291488c..4d5fee12c 100644 --- a/src/core/device_library.h +++ b/src/core/device_library.h @@ -187,8 +187,9 @@ { 74, DeviceType::ALERT, "EM10", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // Gateways - 0x48 -{17, DeviceType::GATEWAY, "MX400", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x48 and 0x4B -{189, DeviceType::GATEWAY, "KM200, MB LAN 2", DeviceFlags::EMS_DEVICE_FLAG_NONE}, +{17, DeviceType::GATEWAY, "MX400", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x48, 0x4B, or 0x50 as wireless base +{189, DeviceType::GATEWAY, "KM200, MB LAN 2", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x48 +{222, DeviceType::GATEWAY, "KM300,", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x4A {252, DeviceType::GATEWAY, "K30RF, MX300", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // Generic - 0x40 or other with no product-id and no version diff --git a/src/core/telegram.cpp b/src/core/telegram.cpp index 9317882c9..a52e858e4 100644 --- a/src/core/telegram.cpp +++ b/src/core/telegram.cpp @@ -572,12 +572,11 @@ bool TxService::send_raw(const char * telegram_data) { return false; } - // since the telegram data is a const, make a copy. add 1 to grab the \0 EOS - char telegram[strlen(telegram_data) + 1]; - strlcpy(telegram, telegram_data, sizeof(telegram)); + // since the telegram data is a const, make a copy + char * telegram = strdup(telegram_data); uint8_t count = 0; - uint8_t data[2 + strlen(telegram) / 3]; + uint8_t data[256]; // max raw telegram length // get values char * p = strtok(telegram, " ,"); // delimiter @@ -585,7 +584,7 @@ bool TxService::send_raw(const char * telegram_data) { data[count++] = (uint8_t)strtol(p, 0, 16); p = strtok(nullptr, " ,"); } - + free(telegram); // check valid length if (count < 4) { return false; diff --git a/src/emsesp_version.h b/src/emsesp_version.h index 62ba7a40a..99a25d00d 100644 --- a/src/emsesp_version.h +++ b/src/emsesp_version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.8.3-dev.1" +#define EMSESP_APP_VERSION "3.8.3-dev.3"