bugfixes
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Irini Kosmidou 2022-11-24 19:41:57 +01:00
parent f932c4c2c5
commit ad168f18b3
12 changed files with 68 additions and 23 deletions

View File

@ -10,10 +10,8 @@
#include "OBSWConfig.h"
#include "devConf.h"
#include "eive/definitions.h"
#include "fsfw/platform.h"
#include "fsfw_tests/integration/task/TestTask.h"
#include "tmtc/pusIds.h"
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
#include "fsfw/osal/common/UdpTcPollingTask.h"
@ -79,7 +77,7 @@ void ObjectFactory::produce(void* args) {
CfdpTmFunnel* cfdpFunnel;
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel);
DummyGpioIF* dummyGpioIF = new DummyGpioIF();
auto* dummyGpioIF = new DummyGpioIF();
auto* dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
static_cast<void>(dummyGpioIF);
#ifdef PLATFORM_UNIX
@ -109,6 +107,14 @@ void ObjectFactory::produce(void* args) {
dummy::DummyCfg cfg;
dummy::createDummies(cfg, *dummySwitcher);
new ThermalController(objects::THERMAL_CONTROLLER);
HeaterHandler* heaterHandler = nullptr;
//new ThermalController(objects::THERMAL_CONTROLLER);
ObjectFactory::createGenericHeaterComponents(*dummyGpioIF, *dummySwitcher, heaterHandler);
if(heaterHandler == nullptr){
sif::error << "HeaterHandler could not be created" << std::endl;
}else{
ObjectFactory::createThermalController(*heaterHandler);
}
new TestTask(objects::TEST_TASK);
}

View File

@ -19,4 +19,5 @@ target_sources(
PlPcduDummy.cpp
CoreControllerDummy.cpp
helpers.cpp
MgmRm3100Dummy.cpp)
MgmRm3100Dummy.cpp
DummyHeaterHandler.cpp)

View File

@ -0,0 +1,6 @@
//
// Created by irini on 24.11.22.
//
#include "DummyHeaterHandler.h"

View File

@ -0,0 +1,13 @@
//
// Created by irini on 24.11.22.
//
#ifndef EIVE_OBSW_DUMMYHEATERHANDLER_H
#define EIVE_OBSW_DUMMYHEATERHANDLER_H
#include "mission/devices/HeaterHandler.h"
class DummyHeaterHandler: public HeaterHandler{
public:
//DummyHeaterHandler();
};
#endif // EIVE_OBSW_DUMMYHEATERHANDLER_H

View File

@ -6,7 +6,7 @@
#include <cstdlib>
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId)
: SystemObject(objects::THERMAL_CONTROLLER),
: SystemObject(objects::THERMAL_TEMP_INSERTER),
max31865PlocHeatspreaderSet(objects::RTD_0_IC3_PLOC_HEATSPREADER, MAX31865::MAX31865_SET_ID),
max31865PlocMissionboardSet(objects::RTD_1_IC4_PLOC_MISSIONBOARD, MAX31865::MAX31865_SET_ID) {
}

2
fsfw

@ -1 +1 @@
Subproject commit 160ff799ace61e24708dcf1fdeaf5fafdf23a4ca
Subproject commit c5f91926c95a8db0c7921176aa3f62cc2bebef47

View File

@ -9,23 +9,14 @@
#include <fsfw_hal/linux/spi/SpiComIF.h>
#include <fsfw_hal/linux/spi/SpiCookie.h>
#include <linux/callbacks/gpioCallbacks.h>
#include <linux/devices/Max31865RtdLowlevelHandler.h>
#include <mission/controller/AcsController.h>
#include <mission/controller/ThermalController.h>
#include <mission/devices/Max31865EiveHandler.h>
#include <mission/devices/Max31865PT1000Handler.h>
#include <mission/devices/ScexDeviceHandler.h>
#include <mission/devices/SusHandler.h>
#include <mission/system/fdir/RtdFdir.h>
#include <mission/system/fdir/SusFdir.h>
#include "OBSWConfig.h"
#include "devConf.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "eive/definitions.h"
#include "mission/system/objects/SusAssembly.h"
#include "mission/system/objects/TcsBoardAssembly.h"
#include "mission/system/tree/acsModeTree.h"
#include "mission/system/tree/payloadModeTree.h"
@ -340,10 +331,6 @@ void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwr
scexHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
}
void ObjectFactory::createThermalController() {
new ThermalController(objects::THERMAL_CONTROLLER);
}
AcsController* ObjectFactory::createAcsController(bool connectSubsystem) {
auto acsCtrl = new AcsController(objects::ACS_CONTROLLER);
if (connectSubsystem) {

View File

@ -11,6 +11,8 @@
#include <optional>
#include <string>
#include "mission/devices/HeaterHandler.h"
class GpioIF;
class SpiComIF;
class PowerSwitchIF;
@ -29,7 +31,6 @@ void createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher,
void gpioChecker(ReturnValue_t result, std::string output);
void createThermalController();
AcsController* createAcsController(bool connectSubsystem);
void addTmtcIpCoresToFunnels(CcsdsIpCoreHandler& ipCoreHandler, PusTmFunnel& pusFunnel,

View File

@ -36,8 +36,12 @@
#if OBSW_ADD_TCPIP_BRIDGE == 1
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
// UDP server includes
#include "devices/gpioIds.h"
#include "fsfw/osal/common/UdpTcPollingTask.h"
#include "fsfw/osal/common/UdpTmTcBridge.h"
#include "mission/controller/ThermalController.h"
#include "mission/devices/HeaterHandler.h"
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
#else
// TCP server includes
#include "fsfw/osal/common/TcpTmTcBridge.h"
@ -179,3 +183,23 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
ccsdsDistrib->registerApplication(info);
#endif
}
void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher, HeaterHandler*& heaterHandler) {
HeaterHelper helper({{
{new HealthDevice(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE),
gpioIds::HEATER_0},
{new HealthDevice(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_1},
{new HealthDevice(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2},
{new HealthDevice(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3},
{new HealthDevice(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
{new HealthDevice(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
{new HealthDevice(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
{new HealthDevice(objects::HEATER_7_HPA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7},
}});
heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher,
pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
}
void ObjectFactory::createThermalController(HeaterHandler& heaterHandler) {
new ThermalController(objects::THERMAL_CONTROLLER, heaterHandler);
}

View File

@ -1,6 +1,10 @@
#ifndef MISSION_CORE_GENERICFACTORY_H_
#define MISSION_CORE_GENERICFACTORY_H_
#include "fsfw_hal/common/gpio/GpioIF.h"
#include "fsfw/power/PowerSwitchIF.h"
class HeaterHandler;
class HealthTableIF;
class PusTmFunnel;
class CfdpTmFunnel;
@ -9,7 +13,9 @@ namespace ObjectFactory {
void produceGenericObjects(HealthTableIF** healthTable, PusTmFunnel** pusFunnel,
CfdpTmFunnel** cfdpFunnel);
void createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher, HeaterHandler*& heaterHandler);
void createThermalController(HeaterHandler& heaterHandler);
}
#endif /* MISSION_CORE_GENERICFACTORY_H_ */

View File

@ -15,6 +15,7 @@
#include <fsfw_hal/common/gpio/GpioIF.h>
#include <array>
#include <utility>
#include <vector>
#include "devices/heaterSwitcherList.h"
@ -28,7 +29,7 @@ using HeaterPair = std::pair<HealthDevice*, gpioId_t>;
struct HeaterHelper {
public:
HeaterHelper(std::array<HeaterPair, heater::NUMBER_OF_SWITCHES> heaters) : heaters(heaters) {}
HeaterHelper(std::array<HeaterPair, heater::NUMBER_OF_SWITCHES> heaters) : heaters(std::move(heaters)) {}
std::array<HeaterPair, heater::NUMBER_OF_SWITCHES> heaters = {};
};
/**

2
tmtc

@ -1 +1 @@
Subproject commit 292bafa0918d386e7f64bf9ed0e114a887420899
Subproject commit d5813e1a422beae7d0cb092a885e0956e9f1ddc1