further fixes
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2023-09-22 16:07:26 +02:00
parent 6b9e191988
commit 0ad3f508a9
2 changed files with 10 additions and 8 deletions

View File

@ -212,7 +212,7 @@ void PowerController::watchStateOfCharge() {
ReturnValue_t PowerController::calculateOpenCircuitVoltageCharge() {
float vBatCorrected =
(bpxBatteryHk.battVoltage.value - iBat * batteryInternalResistance) * MILLIVOLT2VOLT;
(bpxBatteryHk.battVoltage.value - iBat * batteryInternalResistance) * CONVERT_FROM_MILLI;
uint8_t lookUpTableIdx = LOOK_UP_TABLE_MAX_IDX;
ReturnValue_t result = lookUpTableOcvIdxFinder(vBatCorrected, lookUpTableIdx);
if (result != returnvalue::OK) {
@ -236,7 +236,8 @@ ReturnValue_t PowerController::calculateCoulombCounterCharge() {
pwrCtrlCoreHk.coulombCounterCharge.value >= coulombCounterChargeUpperThreshold)) {
coulombCounterCharge = openCircuitVoltageCharge;
} else {
coulombCounterCharge = pwrCtrlCoreHk.coulombCounterCharge.value + iBat * timeDiff;
coulombCounterCharge =
coulombCounterCharge + iBat * CONVERT_FROM_MILLI * timeDiff * SECONDS_TO_HOURS;
}
return returnvalue::OK;
}