v1.10.0 #220
@ -349,7 +349,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1
|
||||
bool enableAside = false;
|
||||
bool enableAside = true;
|
||||
bool enableBside = true;
|
||||
if (enableAside) {
|
||||
// A side
|
||||
|
@ -30,6 +30,9 @@ AcsBoardAssembly::AcsBoardAssembly(object_id_t objectId, object_id_t parentId,
|
||||
void AcsBoardAssembly::handleChildrenTransition() {
|
||||
if (state == States::SWITCHING_POWER) {
|
||||
powerStateMachine(targetMode, targetSubmode);
|
||||
if (state == States::MODE_COMMANDING) {
|
||||
AssemblyBase::handleChildrenTransition();
|
||||
}
|
||||
} else {
|
||||
AssemblyBase::handleChildrenTransition();
|
||||
}
|
||||
@ -72,26 +75,24 @@ ReturnValue_t AcsBoardAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_
|
||||
refreshHelperModes();
|
||||
if (state == States::SWITCHING_POWER) {
|
||||
// Wrong mode
|
||||
sif::error << "Wrong mode, currently swichting power" << std::endl;
|
||||
sif::error << "Wrong mode, currently switching power" << std::endl;
|
||||
return RETURN_OK;
|
||||
}
|
||||
if (submode == A_SIDE) {
|
||||
if (wantedSubmode == A_SIDE) {
|
||||
if ((helper.gyro0SideAMode != wantedMode and helper.gyro1SideAMode != wantedMode) or
|
||||
(helper.mgm0SideAMode != wantedMode and helper.mgm1SideAMode != wantedMode) or
|
||||
helper.gpsMode != wantedMode) {
|
||||
submode = B_SIDE;
|
||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||
}
|
||||
return RETURN_OK;
|
||||
} else if (submode == B_SIDE) {
|
||||
} else if (wantedSubmode == B_SIDE) {
|
||||
if ((helper.gyro2SideBMode != wantedMode and helper.gyro3SideBMode != wantedMode) or
|
||||
(helper.mgm2SideBMode != wantedMode and helper.mgm3SideBMode != wantedMode) or
|
||||
helper.gpsMode != wantedMode) {
|
||||
submode = DUAL_MODE;
|
||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||
}
|
||||
return RETURN_OK;
|
||||
} else if (submode == DUAL_MODE) {
|
||||
} else if (wantedSubmode == DUAL_MODE) {
|
||||
if ((helper.gyro0SideAMode != wantedMode and helper.gyro1SideAMode != wantedMode and
|
||||
helper.gyro2AdisIdSideB != wantedMode and helper.gyro3SideBMode != wantedMode) or
|
||||
(helper.mgm0SideAMode != wantedMode and helper.mgm1SideAMode != wantedMode and
|
||||
@ -115,7 +116,7 @@ ReturnValue_t AcsBoardAssembly::handleNormalOrOnModeCmd(Mode_t mode, Submode_t s
|
||||
if (mode == DeviceHandlerIF::MODE_NORMAL) {
|
||||
if (isUseable(objectId, devMode)) {
|
||||
if (mode != MODE_OFF) {
|
||||
modeTable[tableIdx].setMode(devMode);
|
||||
modeTable[tableIdx].setMode(mode);
|
||||
modeTable[tableIdx].setSubmode(SUBMODE_NONE);
|
||||
} else {
|
||||
result = NEED_SECOND_STEP;
|
||||
@ -123,14 +124,14 @@ ReturnValue_t AcsBoardAssembly::handleNormalOrOnModeCmd(Mode_t mode, Submode_t s
|
||||
modeTable[tableIdx].setSubmode(SUBMODE_NONE);
|
||||
}
|
||||
}
|
||||
} else if (devMode == MODE_ON) {
|
||||
} else if (mode == MODE_ON) {
|
||||
if (isUseable(objectId, devMode)) {
|
||||
modeTable[tableIdx].setMode(MODE_ON);
|
||||
modeTable[tableIdx].setSubmode(SUBMODE_NONE);
|
||||
}
|
||||
}
|
||||
};
|
||||
switch (this->submode) {
|
||||
switch (submode) {
|
||||
case (A_SIDE): {
|
||||
cmdSeq(helper.gyro0AdisIdSideA, helper.gyro0SideAMode, ModeTableIdx::GYRO_0_A);
|
||||
cmdSeq(helper.gyro1L3gIdSideA, helper.gyro1SideAMode, ModeTableIdx::GYRO_1_A);
|
||||
|
Loading…
Reference in New Issue
Block a user