SoC Calculator #754

Merged
muellerr merged 74 commits from soc-calculator into main 2023-10-11 10:50:48 +02:00
Showing only changes of commit 5036836b44 - Show all commits

View File

@ -211,7 +211,7 @@ void PowerController::watchStateOfCharge() {
}
ReturnValue_t PowerController::calculateOpenCircuitVoltageCharge() {
float vBatCorrected = p60CoreHk.batteryVoltage.value - iBat * batteryInternalResistance;
float vBatCorrected = bpxBatteryHk.battVoltage.value - iBat * batteryInternalResistance;
uint8_t lookUpTableIdx = LOOK_UP_TABLE_MAX_IDX;
ReturnValue_t result = lookUpTableOcvIdxFinder(vBatCorrected, lookUpTableIdx);
if (result != returnvalue::OK) {
@ -231,7 +231,7 @@ ReturnValue_t PowerController::calculateCoulombCounterCharge() {
return returnvalue::FAILED;
}
if ((not pwrCtrlCoreHk.coulombCounterCharge.isValid()) or
(p60CoreHk.batteryVoltage.value > coulombCounterVoltageUpperThreshold and
(bpxBatteryHk.battVoltage.value > coulombCounterVoltageUpperThreshold and
pwrCtrlCoreHk.coulombCounterCharge.value >= coulombCounterChargeUpperThreshold)) {
coulombCounterCharge = openCircuitVoltageCharge;
} else {