diff --git a/EMS-ESP-1_9_5b60-d1_mini.bin b/EMS-ESP-1_9_5b60-d1_mini.bin deleted file mode 100644 index e06efd022..000000000 Binary files a/EMS-ESP-1_9_5b60-d1_mini.bin and /dev/null differ diff --git a/platformio.ini b/platformio.ini index 971457c81..ffb8977db 100644 --- a/platformio.ini +++ b/platformio.ini @@ -7,6 +7,12 @@ default_envs = release ; default_envs = debug [common] +# From https://github.com/esp8266/Arduino/blob/master/tools/sdk/ld +# eagle.flash.4m1m.ld = 1019 KB sketch, 1000 KB SPIFFS. 4KB EEPROM, 4KB RFCAL, 12KB WIFI stack, 2052 KB OTA & buffer +# eagle.flash.4m2m.ld = same as above but with 2024 KB SPIFFS +# eagle.flash.4m.ld = same as above but with no SPIFFS storage +ldscript = eagle.flash.4m1m.ld + ; custom build options are: ; -DMYESP_TIMESTAMP ; -DTESTS @@ -30,17 +36,12 @@ custom_flags = # general_flags = -DNO_GLOBAL_EEPROM -DVTABLES_IN_FLASH -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH general_flags = -DNO_GLOBAL_EEPROM - -# From https://github.com/esp8266/Arduino/blob/master/tools/sdk/ld -# eagle.flash.4m1m.ld = 1019 KB sketch, 1000 KB SPIFFS. 4KB EEPROM, 4KB RFCAL, 12KB WIFI stack, 2052 KB OTA & buffer -# eagle.flash.4m2m.ld = same as above but with 2024 KB SPIFFS -# eagle.flash.4m.ld = same as above but with no SPIFFS storage -board_build.ldscript = eagle.flash.4m.ld build_flags = ${common.general_flags} -std=c++11 -fno-exceptions [env] framework = arduino platform = espressif8266 +board_build.ldscript = ${common.ldscript} lib_compat_mode = strict lib_deps = https://github.com/rlogiacco/CircularBuffer @@ -53,7 +54,7 @@ lib_deps = JustWifi@2.0.2 ; https://github.com/xoseperez/justwifi AsyncMqttClient@0.8.2 ; https://github.com/marvinroger/async-mqtt-client EEPROM_Rotate@0.9.2 ; https://github.com/xoseperez/eeprom_rotate - https://github.com/bblanchon/ArduinoJson + ArduinoJson ESPAsyncTCP@1.2.2 ; https://github.com/me-no-dev/ESPAsyncTCP upload_speed = 921600 monitor_speed = 115200 diff --git a/src/ems.cpp b/src/ems.cpp index fe40623c9..1cb335a5e 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -455,6 +455,7 @@ bool _setValue(_EMS_RxTelegram * EMS_RxTelegram, uint32_t * param_op, uint8_t in *param_op = (uint32_t)((EMS_RxTelegram->data[pos] << 16) + (EMS_RxTelegram->data[pos + 1] << 8) + (EMS_RxTelegram->data[pos + 2])); return true; } + // Long 32 bit bool _setValue32(_EMS_RxTelegram * EMS_RxTelegram, uint32_t * param_op, uint8_t index) { int8_t pos = _getDataPosition(EMS_RxTelegram, index); @@ -462,7 +463,8 @@ bool _setValue32(_EMS_RxTelegram * EMS_RxTelegram, uint32_t * param_op, uint8_t return false; } - *param_op = (uint32_t)((EMS_RxTelegram->data[pos] << 24) +(EMS_RxTelegram->data[pos + 1] << 16) + (EMS_RxTelegram->data[pos + 2] << 8) + (EMS_RxTelegram->data[pos + 3])); + *param_op = (uint32_t)((EMS_RxTelegram->data[pos] << 24) + (EMS_RxTelegram->data[pos + 1] << 16) + (EMS_RxTelegram->data[pos + 2] << 8) + + (EMS_RxTelegram->data[pos + 3])); return true; } diff --git a/src/ems_utils.cpp b/src/ems_utils.cpp index dc6138a93..a96811115 100644 --- a/src/ems_utils.cpp +++ b/src/ems_utils.cpp @@ -211,12 +211,12 @@ void _renderLongValue(const char * prefix, const char * postfix, uint32_t value, strlcat(buffer, "?", sizeof(buffer)); } else { char s[20] = {0}; - if(div == 0) { + if (div == 0) { strlcat(buffer, ltoa(value, s, 10), sizeof(buffer)); } else { - strlcat(buffer, ltoa(value/10, s, 10), sizeof(buffer)); + strlcat(buffer, ltoa(value / 10, s, 10), sizeof(buffer)); strlcat(buffer, ".", sizeof(buffer)); - strlcat(buffer, ltoa(value%10, s, 10), sizeof(buffer)); + strlcat(buffer, ltoa(value % 10, s, 10), sizeof(buffer)); } } diff --git a/src/version.h b/src/version.h index 6fa3eb041..d6476f82f 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define APP_VERSION "1.9.5b60" +#define APP_VERSION "1.9.5b61"