battery handler not created
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
0067cac94d
commit
988a5e6b31
@ -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);
|
||||
|
@ -4,6 +4,7 @@
|
||||
class LinuxLibgpioIF;
|
||||
class UartComIF;
|
||||
class SpiComIF;
|
||||
class I2cComIF;
|
||||
|
||||
namespace ObjectFactory {
|
||||
|
||||
@ -11,7 +12,7 @@ void setStatics();
|
||||
void produce(void* args);
|
||||
|
||||
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
|
||||
SpiComIF** spiComIF);
|
||||
SpiComIF** spiComIF, I2cComIF** i2cComIF);
|
||||
void createTmpComponents();
|
||||
void createPcduComponents(LinuxLibgpioIF* gpioComIF);
|
||||
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
|
||||
|
@ -25,6 +25,7 @@ enum commonObjects: uint32_t {
|
||||
PDU1_HANDLER = 0x44250001,
|
||||
PDU2_HANDLER = 0x44250002,
|
||||
ACU_HANDLER = 0x44250003,
|
||||
BPX_BATT_HANDLER = 0x44260000,
|
||||
TMP1075_HANDLER_1 = 0x44420004,
|
||||
TMP1075_HANDLER_2 = 0x44420005,
|
||||
MGM_0_LIS3_HANDLER = 0x44120006,
|
||||
|
@ -41,6 +41,7 @@ debugging. */
|
||||
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
#define OBSW_ADD_MGT 1
|
||||
#define OBSW_ADD_BPX_BATTERY_HANDLER 1
|
||||
#define OBSW_ADD_STAR_TRACKER 0
|
||||
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
||||
#define OBSW_ADD_PLOC_MPSOC 0
|
||||
@ -81,6 +82,7 @@ debugging. */
|
||||
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
||||
|
||||
#define OBSW_DEBUG_P60DOCK 0
|
||||
#define OBSW_DEBUG_BPX_BATT 0
|
||||
#define OBSW_DEBUG_PDU1 0
|
||||
#define OBSW_DEBUG_PDU2 0
|
||||
#define OBSW_DEBUG_GPS 0
|
||||
|
@ -226,3 +226,7 @@ ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& lo
|
||||
localDataPoolMap.emplace(BpxBattery::HkPoolIds::BOOTCAUSE, &bootCause);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
void BpxBatteryHandler::setToGoToNormalMode(bool enable) {
|
||||
this->goToNormalModeImmediately = enable;
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ class BpxBatteryHandler : public DeviceHandlerBase {
|
||||
BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
|
||||
virtual ~BpxBatteryHandler();
|
||||
|
||||
void setToGoToNormalMode(bool enable);
|
||||
|
||||
protected:
|
||||
enum class States {
|
||||
CHECK_COM = 0,
|
||||
@ -45,7 +47,6 @@ class BpxBatteryHandler : public DeviceHandlerBase {
|
||||
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
||||
size_t* foundLen) override;
|
||||
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
||||
virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
|
Loading…
Reference in New Issue
Block a user