set DHB parents differently now
This commit is contained in:
parent
0f609fdaba
commit
f27fccfd29
@ -237,6 +237,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
PowerSwitchIF* pwrSwitcher, object_id_t acsSubsystemId) {
|
||||
using namespace gpio;
|
||||
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
||||
std::vector<std::reference_wrapper<DeviceHandlerBase>> assemblyChildren;
|
||||
|
||||
std::stringstream consumer;
|
||||
GpiodRegularByLineName* gpio = nullptr;
|
||||
@ -345,7 +346,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
|
||||
mgmLis3Handler->setCustomFdir(fdir);
|
||||
static_cast<void>(mgmLis3Handler);
|
||||
assemblyChildren.push_back(*mgmLis3Handler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmLis3Handler->setStartUpImmediately();
|
||||
mgmLis3Handler->setToGoToNormalMode(true);
|
||||
@ -361,8 +362,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
spi::RM3100_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
|
||||
mgmRm3100Handler->setCustomFdir(fdir);
|
||||
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
|
||||
static_cast<void>(mgmRm3100Handler);
|
||||
assemblyChildren.push_back(*mgmRm3100Handler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmRm3100Handler->setStartUpImmediately();
|
||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||
@ -377,8 +377,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
|
||||
mgmLis3Handler->setCustomFdir(fdir);
|
||||
mgmLis3Handler->setParent(objects::ACS_BOARD_ASS);
|
||||
static_cast<void>(mgmLis3Handler);
|
||||
assemblyChildren.push_back(*mgmLis3Handler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmLis3Handler->setStartUpImmediately();
|
||||
mgmLis3Handler->setToGoToNormalMode(true);
|
||||
@ -393,7 +392,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
spiCookie, spi::RM3100_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
|
||||
mgmRm3100Handler->setCustomFdir(fdir);
|
||||
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
|
||||
assemblyChildren.push_back(*mgmRm3100Handler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmRm3100Handler->setStartUpImmediately();
|
||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||
@ -411,8 +410,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
ADIS1650X::Type::ADIS16505);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
||||
adisHandler->setCustomFdir(fdir);
|
||||
adisHandler->setParent(objects::ACS_BOARD_ASS);
|
||||
static_cast<void>(adisHandler);
|
||||
assemblyChildren.push_back(*adisHandler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
adisHandler->setStartUpImmediately();
|
||||
adisHandler->setToGoToNormalModeImmediately();
|
||||
@ -427,7 +425,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
|
||||
gyroL3gHandler->setCustomFdir(fdir);
|
||||
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
|
||||
assemblyChildren.push_back(*gyroL3gHandler);
|
||||
static_cast<void>(gyroL3gHandler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
gyroL3gHandler->setStartUpImmediately();
|
||||
@ -444,7 +442,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
spiCookie, ADIS1650X::Type::ADIS16505);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
||||
adisHandler->setCustomFdir(fdir);
|
||||
adisHandler->setParent(objects::ACS_BOARD_ASS);
|
||||
assemblyChildren.push_back(*adisHandler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
adisHandler->setStartUpImmediately();
|
||||
adisHandler->setToGoToNormalModeImmediately();
|
||||
@ -456,7 +454,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
|
||||
gyroL3gHandler->setCustomFdir(fdir);
|
||||
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
|
||||
assemblyChildren.push_back(*gyroL3gHandler);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
gyroL3gHandler->setStartUpImmediately();
|
||||
gyroL3gHandler->setToGoToNormalMode(true);
|
||||
@ -473,7 +471,6 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
auto gpsCtrl =
|
||||
new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||
|
||||
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
|
||||
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
|
||||
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
|
||||
@ -481,6 +478,10 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
auto acsAss = new AcsBoardAssembly(objects::ACS_BOARD_ASS, acsSubsystemId, pwrSwitcher,
|
||||
acsBoardHelper, gpioComIF);
|
||||
static_cast<void>(acsAss);
|
||||
auto assQueueId = acsAss->getCommandQueue();
|
||||
for (auto& assChild: assemblyChildren) {
|
||||
assChild.get().setParentQueue(assQueueId);
|
||||
}
|
||||
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
||||
}
|
||||
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 78314ad9668a2e01408a0111f7f306bbb468a40f
|
||||
Subproject commit 77f7fa2ef125635d87ad9fd3f0cf79e1cd74d071
|
@ -76,7 +76,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[0] =
|
||||
new SusHandler(objects::SUS_0_N_LOC_XFYFZM_PT_XF, 0, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||
susHandlers[0]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[0]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, SUS::MAX_CMD_SIZE,
|
||||
@ -84,7 +83,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[1] =
|
||||
new SusHandler(objects::SUS_1_N_LOC_XBYFZM_PT_XB, 1, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_1_N_LOC_XBYFZM_PT_XB);
|
||||
susHandlers[1]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[1]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, SUS::MAX_CMD_SIZE,
|
||||
@ -92,7 +90,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[2] =
|
||||
new SusHandler(objects::SUS_2_N_LOC_XFYBZB_PT_YB, 2, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_2_N_LOC_XFYBZB_PT_YB);
|
||||
susHandlers[2]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[2]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, SUS::MAX_CMD_SIZE,
|
||||
@ -100,7 +97,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[3] =
|
||||
new SusHandler(objects::SUS_3_N_LOC_XFYBZF_PT_YF, 3, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_3_N_LOC_XFYBZF_PT_YF);
|
||||
susHandlers[3]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[3]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, SUS::MAX_CMD_SIZE,
|
||||
@ -108,7 +104,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[4] =
|
||||
new SusHandler(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, 4, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_4_N_LOC_XMYFZF_PT_ZF);
|
||||
susHandlers[4]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[4]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, SUS::MAX_CMD_SIZE,
|
||||
@ -116,7 +111,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[5] =
|
||||
new SusHandler(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, 5, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
||||
susHandlers[5]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[5]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, SUS::MAX_CMD_SIZE,
|
||||
@ -124,7 +118,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[6] =
|
||||
new SusHandler(objects::SUS_6_R_LOC_XFYBZM_PT_XF, 6, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
||||
susHandlers[6]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[6]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, SUS::MAX_CMD_SIZE,
|
||||
@ -132,7 +125,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[7] =
|
||||
new SusHandler(objects::SUS_7_R_LOC_XBYBZM_PT_XB, 7, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_7_R_LOC_XBYBZM_PT_XB);
|
||||
susHandlers[7]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[7]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, SUS::MAX_CMD_SIZE,
|
||||
@ -140,7 +132,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[8] =
|
||||
new SusHandler(objects::SUS_8_R_LOC_XBYBZB_PT_YB, 8, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_8_R_LOC_XBYBZB_PT_YB);
|
||||
susHandlers[8]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[8]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, SUS::MAX_CMD_SIZE,
|
||||
@ -148,7 +139,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[9] =
|
||||
new SusHandler(objects::SUS_9_R_LOC_XBYBZB_PT_YF, 9, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_9_R_LOC_XBYBZB_PT_YF);
|
||||
susHandlers[9]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[9]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, SUS::MAX_CMD_SIZE,
|
||||
@ -156,7 +146,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[10] =
|
||||
new SusHandler(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, 10, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_10_N_LOC_XMYBZF_PT_ZF);
|
||||
susHandlers[10]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[10]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, SUS::MAX_CMD_SIZE,
|
||||
@ -164,20 +153,8 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
susHandlers[11] =
|
||||
new SusHandler(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, 11, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_11_R_LOC_XBYMZB_PT_ZB);
|
||||
susHandlers[11]->setParent(objects::SUS_BOARD_ASS);
|
||||
susHandlers[11]->setCustomFdir(fdir);
|
||||
|
||||
for (auto& sus : susHandlers) {
|
||||
if (sus != nullptr) {
|
||||
#if OBSW_TEST_SUS == 1
|
||||
sus->setStartUpImmediately();
|
||||
sus->setToGoToNormalMode(true);
|
||||
#endif
|
||||
#if OBSW_DEBUG_SUS == 1
|
||||
sus->enablePeriodicPrintout(true, 3);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
std::array<object_id_t, 12> susIds = {
|
||||
objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
||||
objects::SUS_2_N_LOC_XFYBZB_PT_YB, objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
||||
@ -189,6 +166,18 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
auto susAss =
|
||||
new SusAssembly(objects::SUS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher, susAssHelper);
|
||||
static_cast<void>(susAss);
|
||||
for (auto& sus : susHandlers) {
|
||||
if (sus != nullptr) {
|
||||
sus->setParentQueue(susAss->getCommandQueue());
|
||||
#if OBSW_TEST_SUS == 1
|
||||
sus->setStartUpImmediately();
|
||||
sus->setToGoToNormalMode(true);
|
||||
#endif
|
||||
#if OBSW_DEBUG_SUS == 1
|
||||
sus->enablePeriodicPrintout(true, 3);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif /* OBSW_ADD_SUN_SENSORS == 1 */
|
||||
}
|
||||
|
||||
@ -290,6 +279,12 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
std::array<SpiCookie*, NUM_RTDS> rtdCookies = {};
|
||||
std::array<Max31865EiveHandler*, NUM_RTDS> rtds = {};
|
||||
RtdFdir* rtdFdir = nullptr;
|
||||
|
||||
TcsBoardHelper helper(rtdInfos);
|
||||
TcsBoardAssembly* tcsBoardAss =
|
||||
new TcsBoardAssembly(objects::TCS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
|
||||
pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
|
||||
static_cast<void>(tcsBoardAss);
|
||||
// Create special low level reader communication interface
|
||||
new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF, gpioComIF);
|
||||
for (uint8_t idx = 0; idx < NUM_RTDS; idx++) {
|
||||
@ -301,7 +296,7 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
rtds[idx] =
|
||||
new Max31865EiveHandler(rtdInfos[idx].first, objects::SPI_RTD_COM_IF, rtdLowLevelCookie);
|
||||
rtds[idx]->setDeviceInfo(idx, rtdInfos[idx].second);
|
||||
rtds[idx]->setParent(objects::TCS_BOARD_ASS);
|
||||
rtds[idx]->setParentQueue(tcsBoardAss->getCommandQueue());
|
||||
rtdFdir = new RtdFdir(rtdInfos[idx].first);
|
||||
rtds[idx]->setCustomFdir(rtdFdir);
|
||||
#if OBSW_DEBUG_RTD == 1
|
||||
@ -313,11 +308,6 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
#endif
|
||||
}
|
||||
|
||||
TcsBoardHelper helper(rtdInfos);
|
||||
TcsBoardAssembly* tcsBoardAss =
|
||||
new TcsBoardAssembly(objects::TCS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
|
||||
pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
|
||||
static_cast<void>(tcsBoardAss);
|
||||
#endif // OBSW_ADD_RTD_DEVICES == 1
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user