From c52746a2dfaa97b521a0a8316b7440e0279b1fd0 Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 20 Mar 2024 15:53:51 +0100 Subject: [PATCH 1/2] fix --- mission/controller/PowerController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.43.0 From 889dd04c6bb1ff8d242648447e93e2daeaf995d7 Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 20 Mar 2024 16:01:20 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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` -- 2.43.0