SM200 energy to 32 bit, fixes #372

This commit is contained in:
Paul
2020-04-28 19:02:01 +02:00
parent 1a5be8e404
commit 487cda0841
5 changed files with 15 additions and 12 deletions

Binary file not shown.

View File

@@ -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

View File

@@ -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;
}

View File

@@ -1 +1 @@
#define APP_VERSION "1.9.5b60"
#define APP_VERSION "1.9.5b61"