enable periodic HK
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-03-26 15:28:00 +02:00
parent e9901f3c85
commit cb2fe300b2
31 changed files with 139 additions and 86 deletions

View File

@ -29,6 +29,11 @@ void ObjectFactory::produce(void* args) {
StorageManagerIF* ipcStore = nullptr;
StorageManagerIF* tmStore = nullptr;
bool enableHkSets = false;
#if OBSW_ENABLE_PERIODIC_HK == 1
enableHkSets = true;
#endif
PersistentTmStores stores;
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
*SdCardManager::instance(), &ipcStore, &tmStore, stores);
@ -61,12 +66,12 @@ void ObjectFactory::produce(void* args) {
auto* comCookieDummy = new ComCookieDummy();
pwrSwitcher = new PcduHandlerDummy(objects::PCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
#else
createPcduComponents(gpioComIF, &pwrSwitcher);
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
#endif
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF);
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS);
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS, enableHkSets);
// Regular FM code, does not work for EM if the hardware is not connected
// createPcduComponents(gpioComIF, &pwrSwitcher);
@ -84,7 +89,7 @@ void ObjectFactory::produce(void* args) {
// createRadSensorComponent(gpioComIF);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, *pwrSwitcher);
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher);
#else
// Still add all GPIOs for EM.
GpioCookie* acsBoardGpios = new GpioCookie();
@ -93,7 +98,7 @@ void ObjectFactory::produce(void* args) {
#endif
#if OBSW_ADD_MGT == 1
createImtqComponents(pwrSwitcher);
createImtqComponents(pwrSwitcher, enableHkSets);
#endif
#if OBSW_ADD_SYRLINKS == 1
@ -105,7 +110,7 @@ void ObjectFactory::produce(void* args) {
#endif
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
createBpxBatteryComponent();
createBpxBatteryComponent(enableHkSets);
#endif
#if OBSW_ADD_STAR_TRACKER == 1
@ -131,7 +136,7 @@ void ObjectFactory::produce(void* args) {
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
#endif
createAcsController(true);
createAcsController(true, enableHkSets);
HeaterHandler* heaterHandler = nullptr;
ObjectFactory::createGenericHeaterComponents(*gpioComIF, *pwrSwitcher, heaterHandler);
createThermalController(*heaterHandler);