Merge pull request 'Small bugfix for Power CTRL set handling' (#804) from power-ctrl-custom-tranisition into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #804
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
Marius Eggert 2023-10-16 16:38:58 +02:00
commit b0f047d76e
2 changed files with 11 additions and 5 deletions

View File

@ -16,6 +16,11 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
## Fixed
- PL Enable set of the power controller is now set to invalid properly
if the power controller is not in normal mode.
# [v7.1.0] 2023-10-11
- Bumped `eive-tmtc` to v5.8.0.

View File

@ -100,15 +100,16 @@ void PowerController::performControlOperation() {
return;
}
case InternalState::READY: {
if (mode != MODE_NORMAL) {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
enablePl.setValidity(false, true);
}
}
if (mode != MODE_OFF) {
calculateStateOfCharge();
if (mode == MODE_NORMAL) {
watchStateOfCharge();
} else {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
enablePl.setValidity(false, true);
}
}
}
break;