something is wrong now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
1610bdecf9
commit
8404ce237b
@ -518,10 +518,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
|||||||
new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
||||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||||
|
|
||||||
auto* healthDevGps0 = new HealthDevice(objects::GPS_0_HEALTH_DEV, objects::ACS_BOARD_ASS);
|
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyChildren, gpsCtrl, gpioComIF);
|
||||||
auto* healthDevGps1 = new HealthDevice(objects::GPS_1_HEALTH_DEV, objects::ACS_BOARD_ASS);
|
|
||||||
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyChildren, *healthDevGps0, *healthDevGps1,
|
|
||||||
gpsCtrl, gpioComIF);
|
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,11 +99,8 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
|||||||
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
assemblyDhbs[7] =
|
assemblyDhbs[7] =
|
||||||
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
auto* gps0HealthDev = new HealthDevice(objects::GPS_0_HEALTH_DEV, objects::ACS_BOARD_ASS);
|
|
||||||
auto* gps1HealthDev = new HealthDevice(objects::GPS_1_HEALTH_DEV, objects::ACS_BOARD_ASS);
|
|
||||||
auto* gpsCtrl = new GpsCtrlDummy(objects::GPS_CONTROLLER);
|
auto* gpsCtrl = new GpsCtrlDummy(objects::GPS_CONTROLLER);
|
||||||
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyDhbs, *gps0HealthDev, *gps1HealthDev,
|
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyDhbs, gpsCtrl, gpioIF);
|
||||||
gpsCtrl, gpioIF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.addSusDummies) {
|
if (cfg.addSusDummies) {
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 1e3c89b672e17700a9b50a312d9df29c54977685
|
Subproject commit 7a392dc33a7e406986fa3684e114a41b0e91de9a
|
@ -343,7 +343,6 @@ void ObjectFactory::createSusAssy(PowerSwitchIF& pwrSwitcher,
|
|||||||
|
|
||||||
void ObjectFactory::createAcsBoardAssy(PowerSwitchIF& pwrSwitcher,
|
void ObjectFactory::createAcsBoardAssy(PowerSwitchIF& pwrSwitcher,
|
||||||
std::array<DeviceHandlerBase*, 8> assemblyDhbs,
|
std::array<DeviceHandlerBase*, 8> assemblyDhbs,
|
||||||
HealthDevice& gps0HealthDev, HealthDevice& gps1HealthDev,
|
|
||||||
ExtendedControllerBase* gpsCtrl, GpioIF* gpioComIF) {
|
ExtendedControllerBase* gpsCtrl, GpioIF* gpioComIF) {
|
||||||
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
|
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
|
||||||
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
|
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
|
||||||
@ -360,8 +359,10 @@ void ObjectFactory::createAcsBoardAssy(PowerSwitchIF& pwrSwitcher,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
gpsCtrl->connectModeTreeParent(*acsAss);
|
gpsCtrl->connectModeTreeParent(*acsAss);
|
||||||
gps0HealthDev.setParentQueue(acsAss->getCommandQueue());
|
auto* gps0HealthDev = new HealthDevice(objects::GPS_0_HEALTH_DEV, acsAss->getCommandQueue());
|
||||||
gps1HealthDev.setParentQueue(acsAss->getCommandQueue());
|
auto* gps1HealthDev = new HealthDevice(objects::GPS_1_HEALTH_DEV, acsAss->getCommandQueue());
|
||||||
|
acsAss->registerChild(objects::GPS_0_HEALTH_DEV, gps0HealthDev->getCommandQueue());
|
||||||
|
acsAss->registerChild(objects::GPS_1_HEALTH_DEV, gps1HealthDev->getCommandQueue());
|
||||||
acsAss->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
acsAss->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,6 @@ void createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t theSwitch,
|
|||||||
std::array<DeviceHandlerBase*, 4> rws, std::array<object_id_t, 4> rwIds);
|
std::array<DeviceHandlerBase*, 4> rws, std::array<object_id_t, 4> rwIds);
|
||||||
void createSusAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 12> suses);
|
void createSusAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 12> suses);
|
||||||
void createAcsBoardAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 8> assemblyDhbs,
|
void createAcsBoardAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 8> assemblyDhbs,
|
||||||
HealthDevice& gps0HealthDev, HealthDevice& gps1HealthDev,
|
|
||||||
ExtendedControllerBase* gpsCtrl, GpioIF* gpioComIF);
|
ExtendedControllerBase* gpsCtrl, GpioIF* gpioComIF);
|
||||||
TcsBoardAssembly* createTcsBoardAssy(PowerSwitchIF& pwrSwitcher);
|
TcsBoardAssembly* createTcsBoardAssy(PowerSwitchIF& pwrSwitcher);
|
||||||
|
|
||||||
|
@ -77,16 +77,14 @@ ReturnValue_t AcsBoardAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_
|
|||||||
if (wantedSubmode == A_SIDE) {
|
if (wantedSubmode == A_SIDE) {
|
||||||
if ((helper.gyro0SideAMode != wantedMode and helper.gyro1SideAMode != wantedMode) or
|
if ((helper.gyro0SideAMode != wantedMode and helper.gyro1SideAMode != wantedMode) or
|
||||||
(helper.mgm0SideAMode != wantedMode and helper.mgm1SideAMode != wantedMode) or
|
(helper.mgm0SideAMode != wantedMode and helper.mgm1SideAMode != wantedMode) or
|
||||||
(helper.gpsMode != MODE_ON) or
|
(helper.gpsMode != MODE_ON) or gps0HealthDevFaulty()) {
|
||||||
gps0HealthDevFaulty()) {
|
|
||||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
} else if (wantedSubmode == B_SIDE) {
|
} else if (wantedSubmode == B_SIDE) {
|
||||||
if ((helper.gyro2SideBMode != wantedMode and helper.gyro3SideBMode != wantedMode) or
|
if ((helper.gyro2SideBMode != wantedMode and helper.gyro3SideBMode != wantedMode) or
|
||||||
(helper.mgm2SideBMode != wantedMode and helper.mgm3SideBMode != wantedMode) or
|
(helper.mgm2SideBMode != wantedMode and helper.mgm3SideBMode != wantedMode) or
|
||||||
(helper.gpsMode != MODE_ON) or
|
(helper.gpsMode != MODE_ON) or gps1HealthDevFaulty()) {
|
||||||
gps1HealthDevFaulty()) {
|
|
||||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -121,7 +119,8 @@ ReturnValue_t AcsBoardAssembly::handleNormalOrOnModeCmd(Mode_t mode, Submode_t s
|
|||||||
modeTable[tableIdx].setSubmode(SUBMODE_NONE);
|
modeTable[tableIdx].setSubmode(SUBMODE_NONE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
bool gpsUsable = isModeCommandable(helper.gpsId, helper.gpsMode);
|
|
||||||
|
bool gpsUsable = isGpsUsable(submode);
|
||||||
auto gpsCmd = [&](bool gnss0NReset, bool gnss1NReset, uint8_t gnssSelect) {
|
auto gpsCmd = [&](bool gnss0NReset, bool gnss1NReset, uint8_t gnssSelect) {
|
||||||
if (gpsUsable) {
|
if (gpsUsable) {
|
||||||
if (mode == MODE_ON or mode == DeviceHandlerIF::MODE_NORMAL) {
|
if (mode == MODE_ON or mode == DeviceHandlerIF::MODE_NORMAL) {
|
||||||
@ -326,3 +325,22 @@ bool AcsBoardAssembly::gps1HealthDevFaulty() const {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AcsBoardAssembly::isGpsUsable(uint8_t targetSubmode) const {
|
||||||
|
if (targetSubmode == duallane::A_SIDE and
|
||||||
|
healthHelper.healthTable->isFaulty(helper.healthDevGps0)) {
|
||||||
|
// Causes a OFF command to be sent, which triggers a side switch or a switch to dual side.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (targetSubmode == duallane::B_SIDE and
|
||||||
|
healthHelper.healthTable->isFaulty(helper.healthDevGps1)) {
|
||||||
|
// Causes a OFF command to be sent, which triggers a side switch or a switch to dual side.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
auto gpsIter = childrenMap.find(helper.gpsId);
|
||||||
|
// Check if device is already in target mode
|
||||||
|
if (gpsIter != childrenMap.end() and gpsIter->second.mode == mode) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@ -135,6 +135,7 @@ class AcsBoardAssembly : public DualLaneAssemblyBase {
|
|||||||
void refreshHelperModes();
|
void refreshHelperModes();
|
||||||
bool gps0HealthDevFaulty() const;
|
bool gps0HealthDevFaulty() const;
|
||||||
bool gps1HealthDevFaulty() const;
|
bool gps1HealthDevFaulty() const;
|
||||||
|
bool isGpsUsable(uint8_t targetSubmode) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_SYSTEM_ACSBOARDASSEMBLY_H_ */
|
#endif /* MISSION_SYSTEM_ACSBOARDASSEMBLY_H_ */
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit f899d169b2a6f7454b2f425dfa2713acf029e016
|
Subproject commit 5f87092465b3d298b9f66410d333e8069e78df95
|
Loading…
x
Reference in New Issue
Block a user