new output format

This commit is contained in:
James 2024-04-27 10:53:29 +01:00
parent 85434230d0
commit 7a78f3bddb
2 changed files with 21 additions and 6 deletions

View File

@ -323,6 +323,15 @@ bool processBasicInfo(byte *data, unsigned int dataLen){
Serial.printf("%s Capacity Remain Percent: %d\r\n",currentName, CapacityRemainPercent); 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 Temp1: %f\r\n",currentName, (float)Temp1 / 10);
Serial.printf("%s Temp2: %f\r\n",currentName, (float)Temp2 / 10); Serial.printf("%s Temp2: %f\r\n",currentName, (float)Temp2 / 10);
Serial.printf(">>>%s.voltage: %f\r\n",currentName, (float)Volts / 1000);
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);
/* /*
Serial.printf("%s Balance Code Low: 0x%x\r\n",currentName, BalanceCodeLow); Serial.printf("%s Balance Code Low: 0x%x\r\n",currentName, BalanceCodeLow);
Serial.printf("%s Balance Code High: 0x%x\r\n",currentName, BalanceCodeHigh); Serial.printf("%s Balance Code High: 0x%x\r\n",currentName, BalanceCodeHigh);
@ -356,6 +365,7 @@ bool processCellInfo(byte *data, unsigned int dataLen)
_cellMin = CellVolt; _cellMin = CellVolt;
} }
Serial.printf(">>>%s.cell.%d.voltage: %f\r\n",currentName, i+1,(float)CellVolt/1000);
Serial.printf("%s Cell %d Voltage: %f\r\n",currentName, i+1,(float)CellVolt/1000); Serial.printf("%s Cell %d Voltage: %f\r\n",currentName, i+1,(float)CellVolt/1000);
} }
@ -364,6 +374,11 @@ bool processCellInfo(byte *data, unsigned int dataLen)
Serial.printf("%s Difference Cell Voltage: %f\r\n",currentName, (float)(_cellMax - _cellMin) / 1000); Serial.printf("%s Difference Cell Voltage: %f\r\n",currentName, (float)(_cellMax - _cellMin) / 1000);
Serial.printf("%s Average Cell Voltage: %f\r\n",currentName, (float)(_cellSum / NumOfCells) / 1000); Serial.printf("%s Average Cell Voltage: %f\r\n",currentName, (float)(_cellSum / NumOfCells) / 1000);
Serial.printf(">>>%s.max_cell_voltage: %f\r\n",currentName, (float)_cellMax / 1000);
Serial.printf(">>>%s.min_cell_voltage: %f\r\n",currentName, (float)_cellMin / 1000);
Serial.printf(">>>%s.difference_cell_voltage: %f\r\n",currentName, (float)(_cellMax - _cellMin) / 1000);
Serial.printf(">>>%s.average_cell_voltage: %f\r\n",currentName, (float)(_cellSum / NumOfCells) / 1000);
gotCellInfo=true; gotCellInfo=true;
return true; return true;

View File

@ -185,11 +185,11 @@ void decodeVictron(BLEAdvertisedDevice advertisedDevice) {
return; return;
} }
Serial.printf("%-31s Battery: %6.2f Volts %6.2f Amps Solar: %6d Watts Yield: %6.0f Wh Load: %6.1f Amps State: %3d\n", Serial.printf(">>>mppt.battery_volts %f\r\n",batteryVoltage);
currentName, Serial.printf(">>>mppt.battery_amps %f\r\n",batteryCurrent);
batteryVoltage, batteryCurrent, Serial.printf(">>>mppt.solar_watts %f\r\n",inputPower);
inputPower, todayYield, Serial.printf(">>>mppt.output_current %f\r\n",outputCurrent);
outputCurrent, deviceState Serial.printf(">>>mppt.yield %f\r\n",todayYield);
); Serial.printf(">>>mppt.state %d\r\n",deviceState);
} }
} }