battery handler not created
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-02-02 17:36:40 +01:00
parent 0067cac94d
commit 988a5e6b31
6 changed files with 25 additions and 6 deletions

View File

@ -45,6 +45,7 @@
#include "linux/devices/devicedefinitions/SusDefinitions.h"
#include "mission/core/GenericFactory.h"
#include "mission/devices/ACUHandler.h"
#include "mission/devices/BpxBatteryHandler.h"
#include "mission/devices/GPSHyperionLinuxController.h"
#include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/devices/HeaterHandler.h"
@ -117,7 +118,8 @@ void ObjectFactory::produce(void* args) {
LinuxLibgpioIF* gpioComIF = nullptr;
UartComIF* uartComIF = nullptr;
SpiComIF* spiComIF = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF);
I2cComIF* i2cComIF = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF, &i2cComIF);
createTmpComponents();
#if BOARD_TE0720 == 0
new CoreController(objects::CORE_CONTROLLER);
@ -154,8 +156,16 @@ void ObjectFactory::produce(void* args) {
#endif
createReactionWheelComponents(gpioComIF);
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
(void)bpxI2cCookie;
BpxBatteryHandler* bpxHandler =
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
#if OBSW_DEBUG_BPX_BATT == 1
bpxHandler->setStartUpImmediately();
bpxHandler->setToGoToNormalMode(true);
#endif
#endif
#if OBSW_ADD_PLOC_MPSOC == 1
UartCookie* plocMpsocCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,
@ -225,7 +235,7 @@ void ObjectFactory::createTmpComponents() {
}
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
SpiComIF** spiComIF) {
SpiComIF** spiComIF, I2cComIF** i2cComIF) {
if (gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) {
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
<< std::endl;
@ -234,7 +244,7 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua
/* Communication interfaces */
new CspComIF(objects::CSP_COM_IF);
new I2cComIF(objects::I2C_COM_IF);
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
*uartComIF = new UartComIF(objects::UART_COM_IF);
#if OBSW_ADD_SPI_TEST_CODE == 0
*spiComIF = new SpiComIF(objects::SPI_COM_IF, *gpioComIF);