From 5036836b442cd309fc8079cd445e8ab9a3bd056a Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 20 Sep 2023 09:19:09 +0200 Subject: [PATCH] use bpx voltage instead --- mission/controller/PowerController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mission/controller/PowerController.cpp b/mission/controller/PowerController.cpp index c87da007..c4bd6ae6 100644 --- a/mission/controller/PowerController.cpp +++ b/mission/controller/PowerController.cpp @@ -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 {