ACS Subsystem Init #228

Merged
muellerr merged 83 commits from mueller/acs-ss-init into develop 2022-11-02 10:34:40 +01:00
4 changed files with 12 additions and 4 deletions
Showing only changes of commit 470b236008 - Show all commits

View File

@ -703,6 +703,7 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
<< std::endl; << std::endl;
} }
} }
rwAss->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
#endif /* OBSW_ADD_RW == 1 */ #endif /* OBSW_ADD_RW == 1 */
} }
@ -894,6 +895,7 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie, new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V); strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
starTracker->setPowerSwitcher(pwrSwitcher); starTracker->setPowerSwitcher(pwrSwitcher);
starTracker->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
} }
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) { void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
@ -902,6 +904,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie, auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
pcdu::Switches::PDU1_CH3_MGT_5V); pcdu::Switches::PDU1_CH3_MGT_5V);
imtqHandler->setPowerSwitcher(pwrSwitcher); imtqHandler->setPowerSwitcher(pwrSwitcher);
imtqHandler->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
static_cast<void>(imtqHandler); static_cast<void>(imtqHandler);
#if OBSW_TEST_IMTQ == 1 #if OBSW_TEST_IMTQ == 1
imtqHandler->setStartUpImmediately(); imtqHandler->setStartUpImmediately();

2
fsfw

@ -1 +1 @@
Subproject commit acab5f6bceef581fae64d1c16af19482ec72abcb Subproject commit 1eceef4645b5a052dbdcd964e7840e7121c57909

View File

@ -166,7 +166,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::SUS_11_R_LOC_XBYMZB_PT_ZB}; objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::SUS_11_R_LOC_XBYMZB_PT_ZB};
SusAssHelper susAssHelper = SusAssHelper(susIds); SusAssHelper susAssHelper = SusAssHelper(susIds);
auto susAss = new SusAssembly(objects::SUS_BOARD_ASS, pwrSwitcher, susAssHelper); auto susAss = new SusAssembly(objects::SUS_BOARD_ASS, pwrSwitcher, susAssHelper);
static_cast<void>(susAss);
for (auto& sus : susHandlers) { for (auto& sus : susHandlers) {
if (sus != nullptr) { if (sus != nullptr) {
ReturnValue_t result = sus->connectModeTreeParent(*susAss); ReturnValue_t result = sus->connectModeTreeParent(*susAss);
@ -183,6 +182,7 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
#endif #endif
} }
} }
susAss->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
#endif /* OBSW_ADD_SUN_SENSORS == 1 */ #endif /* OBSW_ADD_SUN_SENSORS == 1 */
} }

View File

@ -1,3 +1,4 @@
#include <fsfw/container/FixedMap.h>
#include "acsModeTree.h" #include "acsModeTree.h"
#include <fsfw/devicehandlers/DeviceHandlerIF.h> #include <fsfw/devicehandlers/DeviceHandlerIF.h>
@ -69,7 +70,7 @@ auto ACS_TABLE_IDLE_CHRG_TRANS_1 = std::make_pair(
auto ACS_SEQUENCE_TARGET_PT = auto ACS_SEQUENCE_TARGET_PT =
std::make_pair(acs::CtrlModes::TARGET_PT, FixedArrayList<ModeListEntry, 3>()); std::make_pair(acs::CtrlModes::TARGET_PT, FixedArrayList<ModeListEntry, 3>());
auto ACS_TABLE_TARGET_PT_TGT = auto ACS_TABLE_TARGET_PT_TGT =
std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 1, FixedArrayList<ModeListEntry, 5>()); std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 1, FixedArrayList<ModeListEntry, 6>());
auto ACS_TABLE_TARGET_PT_TRANS_0 = auto ACS_TABLE_TARGET_PT_TRANS_0 =
std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 2, FixedArrayList<ModeListEntry, 5>()); std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 2, FixedArrayList<ModeListEntry, 5>());
auto ACS_TABLE_TARGET_PT_TRANS_1 = auto ACS_TABLE_TARGET_PT_TRANS_1 =
@ -149,7 +150,7 @@ void buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TGT.second); iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second); iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second);
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second); iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second);
check(ss->addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_OFF_TGT.first, false, true), ctxc); check(ss->addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_SAFE_TGT.first, false, true), ctxc);
// Build SAFE transition 0 // Build SAFE transition 0
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TRANS_0.second); iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
@ -384,6 +385,10 @@ void buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
void checkInsert(ReturnValue_t result, const char* ctx) { void checkInsert(ReturnValue_t result, const char* ctx) {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
if(result == mapdefs::KEY_ALREADY_EXISTS) {
sif::warning << "satsystem::checkInsert: Insertion failed at " << ctx << ", key already exists" <<
ctx << std::endl;
}
sif::warning << "satsystem::checkInsert: Insertion failed at " << ctx << std::endl; sif::warning << "satsystem::checkInsert: Insertion failed at " << ctx << std::endl;
} }
} }