diff --git a/CHANGELOG.md b/CHANGELOG.md index dfa460bd..4256ff31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- Fixed wrong sign in calculation of total current within the `PWR Controller`. + # [v7.7.3] 2024-03-18 - Bumped `eive-fsfw` diff --git a/mission/controller/PowerController.cpp b/mission/controller/PowerController.cpp index 8fb774dc..e4ad9f81 100644 --- a/mission/controller/PowerController.cpp +++ b/mission/controller/PowerController.cpp @@ -182,7 +182,7 @@ void PowerController::calculateStateOfCharge() { } // calculate total battery current - iBat = p60CoreHk.batteryCurrent.value + bpxBatteryHk.dischargeCurrent.value; + iBat = p60CoreHk.batteryCurrent.value - bpxBatteryHk.dischargeCurrent.value; result = calculateOpenCircuitVoltageCharge(); if (result != returnvalue::OK) {