6 Commits

Author SHA1 Message Date
Proddy
20d6966633 Merge pull request #3087 from MichaelDvP/dev
fixes for #3084 and #3086
2026-05-19 22:33:44 +02:00
MichaelDvP
d5c96f6d48 changelog 2026-05-19 22:13:30 +02:00
MichaelDvP
d1192e707d set upload file limit to 1M again 2026-05-19 22:13:14 +02:00
MichaelDvP
0dacd2c71f don't allocate ariable size on stack 2026-05-18 20:55:57 +02:00
MichaelDvP
3962adc911 Merge remote branch “emsesp/dev” 2026-05-18 08:58:14 +02:00
MichaelDvP
0892738cd9 add KM300 #3084 2026-05-18 07:55:07 +02:00
5 changed files with 12 additions and 9 deletions

View File

@@ -6,8 +6,11 @@ For more details go to [emsesp.org](https://emsesp.org/).
## Added ## Added
- KM300 at address 0x4A [#3084](https://github.com/emsesp/EMS-ESP32/issues/3084)
## Fixed ## Fixed
- signed value for solarInfuence [#3077](https://github.com/emsesp/EMS-ESP32/issues/3077) - 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 ## Changed

View File

@@ -48,7 +48,7 @@ void UploadFileService::handleUpload(AsyncWebServerRequest * request, const Stri
// LittleFS filesystem image // LittleFS filesystem image
_is_filesystem = true; _is_filesystem = true;
_md5[0] = '\0'; // clear any stale md5 so Update.end() doesn't compare against it _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; _is_firmware = true;
} else if (extension == "json") { } else if (extension == "json") {
_md5[0] = '\0'; // clear md5 _md5[0] = '\0'; // clear md5

View File

@@ -187,8 +187,9 @@
{ 74, DeviceType::ALERT, "EM10", DeviceFlags::EMS_DEVICE_FLAG_NONE}, { 74, DeviceType::ALERT, "EM10", DeviceFlags::EMS_DEVICE_FLAG_NONE},
// Gateways - 0x48 // Gateways - 0x48
{17, DeviceType::GATEWAY, "MX400", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x48 and 0x4B {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}, {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}, {252, DeviceType::GATEWAY, "K30RF, MX300", DeviceFlags::EMS_DEVICE_FLAG_NONE},
// Generic - 0x40 or other with no product-id and no version // Generic - 0x40 or other with no product-id and no version

View File

@@ -572,12 +572,11 @@ bool TxService::send_raw(const char * telegram_data) {
return false; return false;
} }
// since the telegram data is a const, make a copy. add 1 to grab the \0 EOS // since the telegram data is a const, make a copy
char telegram[strlen(telegram_data) + 1]; char * telegram = strdup(telegram_data);
strlcpy(telegram, telegram_data, sizeof(telegram));
uint8_t count = 0; uint8_t count = 0;
uint8_t data[2 + strlen(telegram) / 3]; uint8_t data[256]; // max raw telegram length
// get values // get values
char * p = strtok(telegram, " ,"); // delimiter 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); data[count++] = (uint8_t)strtol(p, 0, 16);
p = strtok(nullptr, " ,"); p = strtok(nullptr, " ,");
} }
free(telegram);
// check valid length // check valid length
if (count < 4) { if (count < 4) {
return false; return false;

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.8.3-dev.1" #define EMSESP_APP_VERSION "3.8.3-dev.3"