This commit is contained in:
James 2024-04-25 20:56:36 +01:00
parent 0d453864cc
commit bc4c380bfe

View File

@ -9,7 +9,7 @@
#define BLE_SCAN_DURATION 1 // duration of scan in seconds
#define BLE_REQUEST_DELAY 500 // package request delay after connecting - make this large enough to have the connection established in ms
#define BLE_TIMEOUT 60*1000 // timeout of scan + gathering packets (too short will fail collecting all packets) in ms
#define BLE_TIMEOUT 600*1000 // timeout of scan + gathering packets (too short will fail collecting all packets) in ms
#define BLE_CALLBACK_DEBUG true // send debug messages via MQTT & serial in callbacks (handy for finding your BMS address, name, RSSI, etc)
@ -599,29 +599,29 @@ bool bmsRequestCellInfo(){
void printBasicInfo() //debug all data to uart
{
Serial.printf("Total voltage: %f\n", (float)packBasicInfo.Volts / 1000);
Serial.printf("Amps: %f\n", (float)packBasicInfo.Amps / 1000);
Serial.printf("CapacityRemainAh: %f\n", (float)packBasicInfo.CapacityRemainAh / 1000);
Serial.printf("CapacityRemainPercent: %d\n", packBasicInfo.CapacityRemainPercent);
Serial.printf("Temp1: %f\n", (float)packBasicInfo.Temp1 / 10);
Serial.printf("Temp2: %f\n", (float)packBasicInfo.Temp2 / 10);
Serial.printf("Balance Code Low: 0x%x\n", packBasicInfo.BalanceCodeLow);
Serial.printf("Balance Code High: 0x%x\n", packBasicInfo.BalanceCodeHigh);
Serial.printf("Mosfet Status: 0x%x\n", packBasicInfo.MosfetStatus);
Serial.printf("Total voltage: %f\r\n", (float)packBasicInfo.Volts / 1000);
Serial.printf("Amps: %f\r\n", (float)packBasicInfo.Amps / 1000);
Serial.printf("CapacityRemainAh: %f\r\n", (float)packBasicInfo.CapacityRemainAh / 1000);
Serial.printf("CapacityRemainPercent: %d\r\n", packBasicInfo.CapacityRemainPercent);
Serial.printf("Temp1: %f\r\n", (float)packBasicInfo.Temp1 / 10);
Serial.printf("Temp2: %f\r\n", (float)packBasicInfo.Temp2 / 10);
Serial.printf("Balance Code Low: 0x%x\r\n", packBasicInfo.BalanceCodeLow);
Serial.printf("Balance Code High: 0x%x\r\n", packBasicInfo.BalanceCodeHigh);
Serial.printf("Mosfet Status: 0x%x\r\n", packBasicInfo.MosfetStatus);
}
void printCellInfo() //debug all data to uart
{
Serial.printf("Number of cells: %u\n", packCellInfo.NumOfCells);
Serial.printf("Number of cells: %u\r\n", packCellInfo.NumOfCells);
for (byte i = 1; i <= packCellInfo.NumOfCells; i++)
{
Serial.printf("Cell no. %u", i);
Serial.printf(" %f\n", (float)packCellInfo.CellVolt[i - 1] / 1000);
Serial.printf(" %f\r\n", (float)packCellInfo.CellVolt[i - 1] / 1000);
}
Serial.printf("Max cell volt: %f\n", (float)packCellInfo.CellMax / 1000);
Serial.printf("Min cell volt: %f\n", (float)packCellInfo.CellMin / 1000);
Serial.printf("Difference cell volt: %f\n", (float)packCellInfo.CellDiff / 1000);
Serial.printf("Average cell volt: %f\n", (float)packCellInfo.CellAvg / 1000);
Serial.printf("Max cell volt: %f\r\n", (float)packCellInfo.CellMax / 1000);
Serial.printf("Min cell volt: %f\r\n", (float)packCellInfo.CellMin / 1000);
Serial.printf("Difference cell volt: %f\r\n", (float)packCellInfo.CellDiff / 1000);
Serial.printf("Average cell volt: %f\r\n", (float)packCellInfo.CellAvg / 1000);
Serial.println();
}