ACS controller running in EM SW withour errors now
This commit is contained in:
parent
8a6a69d230
commit
9ad649e43e
@ -43,6 +43,7 @@
|
||||
#include <dummies/SusDummy.h>
|
||||
#include <dummies/SyrlinksDummy.h>
|
||||
#include <dummies/TemperatureSensorsDummy.h>
|
||||
|
||||
#include "dummies/helpers.h"
|
||||
|
||||
void Factory::setStaticFrameworkObjectIds() {
|
||||
|
@ -7,11 +7,11 @@
|
||||
#include "busConf.h"
|
||||
#include "commonObjects.h"
|
||||
#include "devConf.h"
|
||||
#include "dummies/helpers.h"
|
||||
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
||||
#include "linux/ObjectFactory.h"
|
||||
#include "linux/callbacks/gpioCallbacks.h"
|
||||
#include "mission/core/GenericFactory.h"
|
||||
#include "dummies/helpers.h"
|
||||
|
||||
void ObjectFactory::produce(void* args) {
|
||||
ObjectFactory::setStatics();
|
||||
@ -24,6 +24,13 @@ void ObjectFactory::produce(void* args) {
|
||||
I2cComIF* i2cComIF = nullptr;
|
||||
SpiComIF* spiRwComIF = nullptr;
|
||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
|
||||
|
||||
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
||||
// level components.
|
||||
dummy::DummyCfg dummyCfg;
|
||||
dummyCfg.addCoreCtrlCfg = false;
|
||||
dummy::createDummies(dummyCfg);
|
||||
|
||||
createTmpComponents();
|
||||
new CoreController(objects::CORE_CONTROLLER);
|
||||
|
||||
@ -34,8 +41,8 @@ void ObjectFactory::produce(void* args) {
|
||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
||||
// createSyrlinksComponents(pwrSwitcher);
|
||||
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
||||
createRadSensorComponent(gpioComIF);
|
||||
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
|
||||
@ -68,7 +75,4 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
createMiscComponents();
|
||||
createAcsController();
|
||||
dummy::DummyCfg dummyCfg;
|
||||
dummyCfg.addCoreCtrlCfg = false;
|
||||
dummy::createDummies(dummyCfg);
|
||||
}
|
||||
|
@ -17,4 +17,5 @@ target_sources(
|
||||
MgmLIS3MDLDummy.cpp
|
||||
PlPcduDummy.cpp
|
||||
CoreControllerDummy.cpp
|
||||
helpers.cpp)
|
||||
helpers.cpp
|
||||
MgmRm3100Dummy.cpp)
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
|
||||
|
||||
GyroAdisDummy::GyroAdisDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
: DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
|
||||
|
||||
GyroAdisDummy::~GyroAdisDummy() {}
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
|
||||
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
|
||||
|
||||
class GyroAdisDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||
@ -15,6 +17,7 @@ class GyroAdisDummy : public DeviceHandlerBase {
|
||||
virtual ~GyroAdisDummy();
|
||||
|
||||
protected:
|
||||
AdisGyroPrimaryDataset dataset;
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define DUMMIES_MGMLIS3MDLDUMMY_H_
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
|
||||
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h"
|
||||
|
||||
class MgmLIS3MDLDummy : public DeviceHandlerBase {
|
||||
|
40
dummies/MgmRm3100Dummy.cpp
Normal file
40
dummies/MgmRm3100Dummy.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
#include "MgmRm3100Dummy.h"
|
||||
|
||||
using namespace returnvalue;
|
||||
|
||||
MgmRm3100Dummy::MgmRm3100Dummy(object_id_t objectId, object_id_t comif, CookieIF* comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
|
||||
|
||||
MgmRm3100Dummy::~MgmRm3100Dummy() = default;
|
||||
|
||||
void MgmRm3100Dummy::doStartUp() {}
|
||||
|
||||
void MgmRm3100Dummy::doShutDown() {}
|
||||
|
||||
ReturnValue_t MgmRm3100Dummy::buildNormalDeviceCommand(DeviceCommandId_t* id) { return OK; }
|
||||
|
||||
ReturnValue_t MgmRm3100Dummy::buildTransitionDeviceCommand(DeviceCommandId_t* id) { return OK; }
|
||||
|
||||
ReturnValue_t MgmRm3100Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||
const uint8_t* commandData,
|
||||
size_t commandDataLen) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
ReturnValue_t MgmRm3100Dummy::scanForReply(const uint8_t* start, size_t len,
|
||||
DeviceCommandId_t* foundId, size_t* foundLen) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
ReturnValue_t MgmRm3100Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
void MgmRm3100Dummy::fillCommandAndReplyMap() {}
|
||||
|
||||
uint32_t MgmRm3100Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 0; }
|
||||
|
||||
ReturnValue_t MgmRm3100Dummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) {
|
||||
return OK;
|
||||
}
|
29
dummies/MgmRm3100Dummy.h
Normal file
29
dummies/MgmRm3100Dummy.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef DUMMIES_MGMRM3100DUMMY_H_
|
||||
#define DUMMIES_MGMRM3100DUMMY_H_
|
||||
|
||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h"
|
||||
|
||||
class MgmRm3100Dummy : public DeviceHandlerBase {
|
||||
public:
|
||||
MgmRm3100Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||
virtual ~MgmRm3100Dummy();
|
||||
|
||||
protected:
|
||||
RM3100::Rm3100PrimaryDataset dataset;
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
|
||||
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||
size_t commandDataLen) override;
|
||||
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||
size_t *foundLen) override;
|
||||
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||
void fillCommandAndReplyMap() override;
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) override;
|
||||
};
|
||||
|
||||
#endif /* DUMMIES_MGMRM3100DUMMY_H_ */
|
@ -9,21 +9,22 @@
|
||||
#include <dummies/GyroL3GD20Dummy.h>
|
||||
#include <dummies/ImtqDummy.h>
|
||||
#include <dummies/MgmLIS3MDLDummy.h>
|
||||
#include <dummies/MgmRm3100Dummy.h>
|
||||
#include <dummies/P60DockDummy.h>
|
||||
#include <dummies/PduDummy.h>
|
||||
#include <dummies/PlPcduDummy.h>
|
||||
#include <dummies/RwDummy.h>
|
||||
#include <dummies/StarTrackerDummy.h>
|
||||
#include <dummies/SusDummy.h>
|
||||
#include <dummies/SyrlinksDummy.h>
|
||||
|
||||
|
||||
using namespace dummy;
|
||||
|
||||
void dummy::createDummies(DummyCfg cfg) {
|
||||
new ComIFDummy(objects::DUMMY_COM_IF);
|
||||
ComCookieDummy* comCookieDummy = new ComCookieDummy();
|
||||
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
if(cfg.addCoreCtrlCfg) {
|
||||
if (cfg.addCoreCtrlCfg) {
|
||||
new CoreControllerDummy(objects::CORE_CONTROLLER);
|
||||
}
|
||||
|
||||
@ -34,21 +35,26 @@ void dummy::createDummies(DummyCfg cfg) {
|
||||
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new SyrlinksDummy(objects::SYRLINKS_HK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
if(cfg.addPowerDummies) {
|
||||
if (cfg.addPowerDummies) {
|
||||
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new PduDummy(objects::PDU1_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new PduDummy(objects::PDU2_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new P60DockDummy(objects::P60DOCK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
}
|
||||
|
||||
if(cfg.addAcsBoardDummies) {
|
||||
if (cfg.addAcsBoardDummies) {
|
||||
new GyroAdisDummy(objects::GYRO_0_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new GyroL3GD20Dummy(objects::GYRO_1_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new MgmLIS3MDLDummy(objects::MGM_0_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new MgmRm3100Dummy(objects::MGM_1_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new MgmRm3100Dummy(objects::MGM_3_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
}
|
||||
|
||||
if (cfg.addSusDummies) {
|
||||
new SusDummy();
|
||||
}
|
||||
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
}
|
||||
|
@ -6,8 +6,9 @@ struct DummyCfg {
|
||||
bool addCoreCtrlCfg = true;
|
||||
bool addPowerDummies = true;
|
||||
bool addAcsBoardDummies = true;
|
||||
bool addSusDummies = true;
|
||||
};
|
||||
|
||||
void createDummies(DummyCfg cfg);
|
||||
|
||||
}
|
||||
} // namespace dummy
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit cf8fe7ea728bea077b9936bcf0db96845bc6419e
|
||||
Subproject commit 7e0a5d5a9e4f38c6d818bbdd5b44d34d8007eb1e
|
@ -4,8 +4,8 @@
|
||||
#include "AxiPtmeConfig.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "fsfw/returnvalues/returnvalue.h"
|
||||
#include "returnvalues/classIds.h"
|
||||
#include "linux/obc/PtmeConfig.h"
|
||||
#include "returnvalues/classIds.h"
|
||||
|
||||
/**
|
||||
* @brief Class to configure donwlink specific parameters in the PTME IP core.
|
||||
|
@ -4,10 +4,9 @@
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
|
||||
#include "devicedefinitions/SusDefinitions.h"
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
||||
#include "mission/devices/max1227.h"
|
||||
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "returnvalues/classIds.h"
|
||||
|
||||
/**
|
||||
|
@ -113,6 +113,8 @@ class AdisGyroPrimaryDataset : public StaticLocalDataSet<8> {
|
||||
|
||||
private:
|
||||
friend class GyroADIS1650XHandler;
|
||||
friend class GyroAdisDummy;
|
||||
|
||||
/** Constructor for the data creator */
|
||||
AdisGyroPrimaryDataset(HasLocalDataPoolIF* hkOwner)
|
||||
: StaticLocalDataSet(hkOwner, ADIS1650X::ADIS_DATASET_ID) {}
|
||||
|
Loading…
Reference in New Issue
Block a user