Smart-BMS-Bluetooth-ESP32 icon indicating copy to clipboard operation
Smart-BMS-Bluetooth-ESP32 copied to clipboard

Variable CapacityRemainAh has the wrong type uint16_t

Open gmbo opened this issue 3 years ago • 0 comments

Wenn ich zu einer 200Ah Batterie verbinde, erhalte ich ungültige Werte für die Kapazität, da da die Variable CapacityRemainAh mit uint16_t zu klein dimensioniert ist. Sie sollte mit uint32_t in den Files mydatatypes.h Zeile 25 uint32_t CapacityAh; und BMS_process_data.ino
Zeile 59 output->CapacityRemainAh = ((uint32_t)two_ints_into16(data[4], data[5])) * 10; deklariert werden.

If I connect to a 200Ah battery, I get invalid values for the capacity, because there the variable CapacityRemainAh with uint16_t is dimensioned too small. It should be defined with uint32_t in the files mydatatypes.h Line 25 uint32_t CapacityAh; and BMS_process_data.ino
Line 59 output->CapacityRemainAh = ((uint32_t)two_ints_into16(data[4], data[5])) * 10; must be declared.

gmbo avatar Oct 30 '21 20:10 gmbo