This commit is contained in:
parent
8ebc62cbe6
commit
8a6a69d230
@ -1,4 +1,5 @@
|
|||||||
#include <fsfw/health/HealthTableIF.h>
|
#include <fsfw/health/HealthTableIF.h>
|
||||||
|
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/core/CoreController.h"
|
#include "bsp_q7s/core/CoreController.h"
|
||||||
@ -10,6 +11,7 @@
|
|||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
#include "mission/core/GenericFactory.h"
|
#include "mission/core/GenericFactory.h"
|
||||||
|
#include "dummies/helpers.h"
|
||||||
|
|
||||||
void ObjectFactory::produce(void* args) {
|
void ObjectFactory::produce(void* args) {
|
||||||
ObjectFactory::setStatics();
|
ObjectFactory::setStatics();
|
||||||
@ -20,14 +22,18 @@ void ObjectFactory::produce(void* args) {
|
|||||||
UartComIF* uartComIF = nullptr;
|
UartComIF* uartComIF = nullptr;
|
||||||
SpiComIF* spiMainComIF = nullptr;
|
SpiComIF* spiMainComIF = nullptr;
|
||||||
I2cComIF* i2cComIF = nullptr;
|
I2cComIF* i2cComIF = nullptr;
|
||||||
PowerSwitchIF* pwrSwitcher = nullptr;
|
|
||||||
SpiComIF* spiRwComIF = nullptr;
|
SpiComIF* spiRwComIF = nullptr;
|
||||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
|
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
|
||||||
createTmpComponents();
|
createTmpComponents();
|
||||||
new CoreController(objects::CORE_CONTROLLER);
|
new CoreController(objects::CORE_CONTROLLER);
|
||||||
|
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
createPcduComponents(gpioComIF, &pwrSwitcher);
|
PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
||||||
|
|
||||||
|
// Regular FM code, does not work for EM if the hardware is not connected
|
||||||
|
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||||
|
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
||||||
|
// createSyrlinksComponents(pwrSwitcher);
|
||||||
createRadSensorComponent(gpioComIF);
|
createRadSensorComponent(gpioComIF);
|
||||||
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
||||||
|
|
||||||
@ -36,14 +42,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#endif
|
#endif
|
||||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
||||||
createSolarArrayDeploymentComponents();
|
createSolarArrayDeploymentComponents();
|
||||||
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
|
||||||
#if OBSW_ADD_SYRLINKS == 1
|
|
||||||
#if OBSW_Q7S_EM == 1
|
|
||||||
createSyrlinksComponents(nullptr);
|
|
||||||
#else
|
|
||||||
createSyrlinksComponents(pwrSwitcher);
|
|
||||||
#endif /* OBSW_Q7S_EM == 1 */
|
|
||||||
#endif /* OBSW_ADD_SYRLINKS == 1 */
|
|
||||||
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
||||||
createPayloadComponents(gpioComIF);
|
createPayloadComponents(gpioComIF);
|
||||||
|
|
||||||
@ -69,4 +68,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
|
|
||||||
createMiscComponents();
|
createMiscComponents();
|
||||||
createAcsController();
|
createAcsController();
|
||||||
|
dummy::DummyCfg dummyCfg;
|
||||||
|
dummyCfg.addCoreCtrlCfg = false;
|
||||||
|
dummy::createDummies(dummyCfg);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
using namespace dummy;
|
using namespace dummy;
|
||||||
|
|
||||||
void createDummies(DummyCfg cfg) {
|
void dummy::createDummies(DummyCfg cfg) {
|
||||||
new ComIFDummy(objects::DUMMY_COM_IF);
|
new ComIFDummy(objects::DUMMY_COM_IF);
|
||||||
ComCookieDummy* comCookieDummy = new ComCookieDummy();
|
ComCookieDummy* comCookieDummy = new ComCookieDummy();
|
||||||
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
Loading…
Reference in New Issue
Block a user