wh
This commit is contained in:
parent
2c50bf9b1d
commit
62a13860da
@ -288,6 +288,8 @@ bool bmsProcessPacket(byte *packet)
|
||||
|
||||
|
||||
bool processBasicInfo(byte *data, unsigned int dataLen){
|
||||
//// NICER!!!: https://github.com/neilsheps/overkill-xiaoxiang-jbd-bms-ble-reader/blob/main/src/main.cpp
|
||||
|
||||
uint16_t Volts = ((uint32_t)two_ints_into16(data[0], data[1])) * 10; // Resolution 10 mV -> convert to milivolts eg 4895 > 48950mV
|
||||
int32_t Amps = ((int32_t)two_ints_into16(data[2], data[3])) * 10; // Resolution 10 mA -> convert to miliamps
|
||||
|
||||
@ -310,6 +312,7 @@ bool processBasicInfo(byte *data, unsigned int dataLen){
|
||||
Serial.printf("%s Amps: %f\r\n",currentName, (float)Amps / 1000);
|
||||
Serial.printf("%s Watts: %f\r\n",currentName, (float)Watts);
|
||||
Serial.printf("%s Capacity Remain Ah: %f\r\n",currentName, (float)CapacityRemainAh / 1000);
|
||||
Serial.printf("%s Capacity Remain Wh: %f\r\n",currentName, ((float)(CapacityRemainAh) / 1000) * ((float)(Volts) / 1000));
|
||||
Serial.printf("%s Capacity Remain Percent: %d\r\n",currentName, CapacityRemainPercent);
|
||||
Serial.printf("%s Temp1: %f\r\n",currentName, (float)Temp1 / 10);
|
||||
Serial.printf("%s Temp2: %f\r\n",currentName, (float)Temp2 / 10);
|
||||
|
Loading…
Reference in New Issue
Block a user