v1.9.0 #175
@ -45,6 +45,7 @@
|
|||||||
#include "linux/devices/devicedefinitions/SusDefinitions.h"
|
#include "linux/devices/devicedefinitions/SusDefinitions.h"
|
||||||
#include "mission/core/GenericFactory.h"
|
#include "mission/core/GenericFactory.h"
|
||||||
#include "mission/devices/ACUHandler.h"
|
#include "mission/devices/ACUHandler.h"
|
||||||
|
#include "mission/devices/BpxBatteryHandler.h"
|
||||||
#include "mission/devices/GPSHyperionLinuxController.h"
|
#include "mission/devices/GPSHyperionLinuxController.h"
|
||||||
#include "mission/devices/GyroADIS1650XHandler.h"
|
#include "mission/devices/GyroADIS1650XHandler.h"
|
||||||
#include "mission/devices/HeaterHandler.h"
|
#include "mission/devices/HeaterHandler.h"
|
||||||
@ -117,7 +118,8 @@ void ObjectFactory::produce(void* args) {
|
|||||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||||
UartComIF* uartComIF = nullptr;
|
UartComIF* uartComIF = nullptr;
|
||||||
SpiComIF* spiComIF = nullptr;
|
SpiComIF* spiComIF = nullptr;
|
||||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF);
|
I2cComIF* i2cComIF = nullptr;
|
||||||
|
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF, &i2cComIF);
|
||||||
createTmpComponents();
|
createTmpComponents();
|
||||||
#if BOARD_TE0720 == 0
|
#if BOARD_TE0720 == 0
|
||||||
new CoreController(objects::CORE_CONTROLLER);
|
new CoreController(objects::CORE_CONTROLLER);
|
||||||
@ -154,8 +156,16 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#endif
|
#endif
|
||||||
createReactionWheelComponents(gpioComIF);
|
createReactionWheelComponents(gpioComIF);
|
||||||
|
|
||||||
|
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
||||||
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
|
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
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
UartCookie* plocMpsocCookie =
|
UartCookie* plocMpsocCookie =
|
||||||
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,
|
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,
|
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
|
||||||
SpiComIF** spiComIF) {
|
SpiComIF** spiComIF, I2cComIF** i2cComIF) {
|
||||||
if (gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) {
|
if (gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) {
|
||||||
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
|
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -234,7 +244,7 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua
|
|||||||
|
|
||||||
/* Communication interfaces */
|
/* Communication interfaces */
|
||||||
new CspComIF(objects::CSP_COM_IF);
|
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);
|
*uartComIF = new UartComIF(objects::UART_COM_IF);
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 0
|
#if OBSW_ADD_SPI_TEST_CODE == 0
|
||||||
*spiComIF = new SpiComIF(objects::SPI_COM_IF, *gpioComIF);
|
*spiComIF = new SpiComIF(objects::SPI_COM_IF, *gpioComIF);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
class LinuxLibgpioIF;
|
class LinuxLibgpioIF;
|
||||||
class UartComIF;
|
class UartComIF;
|
||||||
class SpiComIF;
|
class SpiComIF;
|
||||||
|
class I2cComIF;
|
||||||
|
|
||||||
namespace ObjectFactory {
|
namespace ObjectFactory {
|
||||||
|
|
||||||
@ -11,7 +12,7 @@ void setStatics();
|
|||||||
void produce(void* args);
|
void produce(void* args);
|
||||||
|
|
||||||
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
|
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
|
||||||
SpiComIF** spiComIF);
|
SpiComIF** spiComIF, I2cComIF** i2cComIF);
|
||||||
void createTmpComponents();
|
void createTmpComponents();
|
||||||
void createPcduComponents(LinuxLibgpioIF* gpioComIF);
|
void createPcduComponents(LinuxLibgpioIF* gpioComIF);
|
||||||
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
|
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
|
||||||
|
@ -25,6 +25,7 @@ enum commonObjects: uint32_t {
|
|||||||
PDU1_HANDLER = 0x44250001,
|
PDU1_HANDLER = 0x44250001,
|
||||||
PDU2_HANDLER = 0x44250002,
|
PDU2_HANDLER = 0x44250002,
|
||||||
ACU_HANDLER = 0x44250003,
|
ACU_HANDLER = 0x44250003,
|
||||||
|
BPX_BATT_HANDLER = 0x44260000,
|
||||||
TMP1075_HANDLER_1 = 0x44420004,
|
TMP1075_HANDLER_1 = 0x44420004,
|
||||||
TMP1075_HANDLER_2 = 0x44420005,
|
TMP1075_HANDLER_2 = 0x44420005,
|
||||||
MGM_0_LIS3_HANDLER = 0x44120006,
|
MGM_0_LIS3_HANDLER = 0x44120006,
|
||||||
|
@ -41,6 +41,7 @@ debugging. */
|
|||||||
|
|
||||||
#define OBSW_ENABLE_TIMERS 1
|
#define OBSW_ENABLE_TIMERS 1
|
||||||
#define OBSW_ADD_MGT 1
|
#define OBSW_ADD_MGT 1
|
||||||
|
#define OBSW_ADD_BPX_BATTERY_HANDLER 1
|
||||||
#define OBSW_ADD_STAR_TRACKER 0
|
#define OBSW_ADD_STAR_TRACKER 0
|
||||||
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
||||||
#define OBSW_ADD_PLOC_MPSOC 0
|
#define OBSW_ADD_PLOC_MPSOC 0
|
||||||
@ -81,6 +82,7 @@ debugging. */
|
|||||||
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
||||||
|
|
||||||
#define OBSW_DEBUG_P60DOCK 0
|
#define OBSW_DEBUG_P60DOCK 0
|
||||||
|
#define OBSW_DEBUG_BPX_BATT 0
|
||||||
#define OBSW_DEBUG_PDU1 0
|
#define OBSW_DEBUG_PDU1 0
|
||||||
#define OBSW_DEBUG_PDU2 0
|
#define OBSW_DEBUG_PDU2 0
|
||||||
#define OBSW_DEBUG_GPS 0
|
#define OBSW_DEBUG_GPS 0
|
||||||
|
@ -226,3 +226,7 @@ ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& lo
|
|||||||
localDataPoolMap.emplace(BpxBattery::HkPoolIds::BOOTCAUSE, &bootCause);
|
localDataPoolMap.emplace(BpxBattery::HkPoolIds::BOOTCAUSE, &bootCause);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
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);
|
BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
|
||||||
virtual ~BpxBatteryHandler();
|
virtual ~BpxBatteryHandler();
|
||||||
|
|
||||||
|
void setToGoToNormalMode(bool enable);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum class States {
|
enum class States {
|
||||||
CHECK_COM = 0,
|
CHECK_COM = 0,
|
||||||
@ -45,7 +47,6 @@ class BpxBatteryHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
||||||
size_t* foundLen) override;
|
size_t* foundLen) override;
|
||||||
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) 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;
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) override;
|
LocalDataPoolManager& poolManager) override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user