Merge remote-tracking branch 'origin/main' into startracker-tests
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
||||
#include <bsp_q7s/objectFactory.h>
|
||||
#include <dummies/ComCookieDummy.h>
|
||||
#include <dummies/PcduHandlerDummy.h>
|
||||
#include <fsfw/health/HealthTableIF.h>
|
||||
@ -10,8 +11,8 @@
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "bsp_q7s/core/CoreController.h"
|
||||
#include "bsp_q7s/core/ObjectFactory.h"
|
||||
#include "busConf.h"
|
||||
#include "common/config/devices/addresses.h"
|
||||
#include "devConf.h"
|
||||
#include "dummies/helperFactory.h"
|
||||
#include "eive/objects.h"
|
||||
@ -35,6 +36,7 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif
|
||||
|
||||
PersistentTmStores stores;
|
||||
readFirmwareVersion();
|
||||
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
|
||||
*SdCardManager::instance(), &ipcStore, &tmStore, stores, 200,
|
||||
enableHkSets);
|
||||
@ -44,7 +46,7 @@ void ObjectFactory::produce(void* args) {
|
||||
SpiComIF* spiMainComIF = nullptr;
|
||||
I2cComIF* i2cComIF = nullptr;
|
||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF);
|
||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||
// Adding GPIOs for chip select decoding and initializing them.
|
||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||
createPlI2cResetGpio(gpioComIF);
|
||||
@ -60,6 +62,21 @@ void ObjectFactory::produce(void* args) {
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
||||
dummyCfg.addPlocDummies = false;
|
||||
#endif
|
||||
#if OBSW_ADD_TMP_DEVICES == 1
|
||||
std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd = {{
|
||||
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
|
||||
{objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
|
||||
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
|
||||
}};
|
||||
createTmpComponents(tmpDevsToAdd);
|
||||
dummy::Tmp1075Cfg tmpCfg{};
|
||||
tmpCfg.addTcsBrd0 = true;
|
||||
tmpCfg.addTcsBrd1 = true;
|
||||
tmpCfg.addPlPcdu0 = false;
|
||||
tmpCfg.addPlPcdu1 = false;
|
||||
tmpCfg.addIfBrd = false;
|
||||
dummyCfg.tmp1075Cfg = tmpCfg;
|
||||
#endif
|
||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||
dummyCfg.addPowerDummies = false;
|
||||
// The ACU broke.
|
||||
@ -87,9 +104,10 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
// Still initialize chip select to avoid SPI bus issues.
|
||||
// Initialize chip select to avoid SPI bus issues.
|
||||
createRadSensorChipSelect(gpioComIF);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true,
|
||||
adis1650x::Type::ADIS16507);
|
||||
#else
|
||||
@ -99,8 +117,12 @@ void ObjectFactory::produce(void* args) {
|
||||
gpioChecker(gpioComIF->addGpios(acsBoardGpios), "ACS Board");
|
||||
#endif
|
||||
|
||||
const char* battAndImtqI2cDev = q7s::I2C_PL_EIVE;
|
||||
if (core::FW_VERSION_MAJOR >= 4) {
|
||||
battAndImtqI2cDev = q7s::I2C_PS_EIVE;
|
||||
}
|
||||
#if OBSW_ADD_MGT == 1
|
||||
createImtqComponents(pwrSwitcher, enableHkSets);
|
||||
createImtqComponents(pwrSwitcher, enableHkSets, battAndImtqI2cDev);
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_SYRLINKS == 1
|
||||
@ -112,7 +134,7 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
||||
createBpxBatteryComponent(enableHkSets);
|
||||
createBpxBatteryComponent(enableHkSets, battAndImtqI2cDev);
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_STAR_TRACKER == 1
|
||||
@ -144,6 +166,6 @@ void ObjectFactory::produce(void* args) {
|
||||
createAcsController(true, enableHkSets);
|
||||
HeaterHandler* heaterHandler;
|
||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
||||
createThermalController(*heaterHandler);
|
||||
satsystem::init();
|
||||
createThermalController(*heaterHandler, true);
|
||||
satsystem::init(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user