From 08c98bd354f2d1b23854ba305ae4f70ba3bc0409 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 18 Jul 2023 09:52:26 +0200 Subject: [PATCH] add rad sensor dummy --- dummies/CMakeLists.txt | 1 + dummies/RadSensorDummy.h | 5 +---- dummies/helperFactory.cpp | 7 +++++++ dummies/helperFactory.h | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dummies/CMakeLists.txt b/dummies/CMakeLists.txt index 6a49fcc6..bc8ab837 100644 --- a/dummies/CMakeLists.txt +++ b/dummies/CMakeLists.txt @@ -19,6 +19,7 @@ target_sources( GpsCtrlDummy.cpp GyroAdisDummy.cpp GyroL3GD20Dummy.cpp + RadSensorDummy.cpp MgmLIS3MDLDummy.cpp PlPcduDummy.cpp ExecutableComIfDummy.cpp diff --git a/dummies/RadSensorDummy.h b/dummies/RadSensorDummy.h index c38d35a1..539e10ce 100644 --- a/dummies/RadSensorDummy.h +++ b/dummies/RadSensorDummy.h @@ -1,5 +1,4 @@ -#ifndef DUMMIES_SUSDUMMY_H_ -#define DUMMIES_SUSDUMMY_H_ +#pragma once #include @@ -33,5 +32,3 @@ class RadSensorDummy : public DeviceHandlerBase { ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) override; }; - -#endif /* DUMMIES_SUSDUMMY_H_ */ diff --git a/dummies/helperFactory.cpp b/dummies/helperFactory.cpp index 1612db52..8f58cbaf 100644 --- a/dummies/helperFactory.cpp +++ b/dummies/helperFactory.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -34,6 +35,7 @@ #include "TemperatureSensorInserter.h" #include "dummies/Max31865Dummy.h" +#include "dummies/SusDummy.h" #include "dummies/Tmp1075Dummy.h" #include "mission/genericFactory.h" #include "mission/system/acs/acsModeTree.h" @@ -257,4 +259,9 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio objects::PLOC_SUPERVISOR_HANDLER, objects::DUMMY_COM_IF, comCookieDummy, pwrSwitcher); plocSupervisorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM); } + if (cfg.addRadSensorDummy) { + auto* radSensorDummy = + new RadSensorDummy(objects::RAD_SENSOR, objects::DUMMY_COM_IF, comCookieDummy); + radSensorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM); + } } diff --git a/dummies/helperFactory.h b/dummies/helperFactory.h index bd5993c6..32da11cd 100644 --- a/dummies/helperFactory.h +++ b/dummies/helperFactory.h @@ -29,6 +29,7 @@ struct DummyCfg { bool addPlocDummies = true; bool addStrDummy = true; bool addTmpDummies = true; + bool addRadSensorDummy = true; Tmp1075Cfg tmp1075Cfg; bool addCamSwitcherDummy = false; bool addScexDummy = false;