Dual Lane Boards: Allow Side Switches #412

Merged
muellerr merged 6 commits from feature_allow_side_switch into develop 2023-03-24 21:10:56 +01:00
5 changed files with 17 additions and 14 deletions
Showing only changes of commit 36f820a07a - Show all commits

View File

@ -3,6 +3,7 @@
#include <eive/eventSubsystemIds.h>
#include <eive/resultClassIds.h>
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
#include "mission/devices/devicedefinitions/acsPolling.h"

View File

@ -34,7 +34,12 @@ void DualLaneAssemblyBase::startTransition(Mode_t mode, Submode_t submode) {
// doStartTransition(mode, submode);
using namespace duallane;
pwrStateMachine.reset();
if (mode != MODE_OFF) {
bool pwrStateMachineToOff = false;
if (mode == MODE_OFF or
(this->submode == duallane::Submodes::DUAL_MODE and submode != Submodes::DUAL_MODE)) {
pwrStateMachineToOff = true;
}
if (not pwrStateMachineToOff) {
// If anything other than MODE_OFF is commanded, perform power state machine first
// Cache the target modes, required by power state machine
pwrStateMachine.start(mode, submode);

View File

@ -31,13 +31,10 @@ class DualLaneAssemblyBase : public AssemblyBase, public ConfirmsFailuresIF {
uint8_t powerRetryCounter = 0;
bool tryingOtherSide = false;
bool dualModeErrorSwitch = true;
bool pwrStateMachineFirst = false;
duallane::Submodes defaultSubmode = duallane::Submodes::A_SIDE;
enum SideSwitchState {
NONE,
TO_DUAL,
DISABLE_OTHER_SIDE
};
enum SideSwitchState { NONE, TO_DUAL, DISABLE_OTHER_SIDE };
SideSwitchState sideSwitchState = SideSwitchState::NONE;
duallane::Submodes targetSubmodeForSideSwitch = duallane::Submodes::B_SIDE;