add new heater health device
This commit is contained in:
parent
aa746276ae
commit
6f67bd500b
@ -451,7 +451,7 @@ ReturnValue_t StrComHandler::performFlashWrite() {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
result = writeNextSegment(idx);
|
||||
if(result != returnvalue::OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if (idx % 50 == 0) {
|
||||
|
@ -287,15 +287,17 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
||||
void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher,
|
||||
HeaterHandler*& heaterHandler) {
|
||||
HeaterHelper helper({{
|
||||
{new HealthDevice(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE),
|
||||
{new HeaterHealthDev(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_SYRLINKS, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7},
|
||||
{new HeaterHealthDev(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE),
|
||||
gpioIds::HEATER_1},
|
||||
{new HeaterHealthDev(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2},
|
||||
{new HeaterHealthDev(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3},
|
||||
{new HeaterHealthDev(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
|
||||
{new HeaterHealthDev(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
|
||||
{new HeaterHealthDev(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
|
||||
{new HeaterHealthDev(objects::HEATER_7_SYRLINKS, MessageQueueIF::NO_QUEUE),
|
||||
gpioIds::HEATER_7},
|
||||
}});
|
||||
heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher,
|
||||
power::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
|
||||
|
@ -1,3 +1,4 @@
|
||||
target_sources(
|
||||
${LIB_EIVE_MISSION} PRIVATE HeaterHandler.cpp max1227.cpp
|
||||
Max31865EiveHandler.cpp Tmp1075Handler.cpp)
|
||||
${LIB_EIVE_MISSION}
|
||||
PRIVATE HeaterHandler.cpp max1227.cpp Max31865EiveHandler.cpp
|
||||
Tmp1075Handler.cpp HeaterHealthDev.cpp)
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||
#include <fsfw/timemanager/Countdown.h>
|
||||
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||
#include <mission/tcs/HeaterHealthDev.h>
|
||||
|
||||
#include <array>
|
||||
#include <utility>
|
||||
@ -27,7 +28,7 @@
|
||||
class PowerSwitchIF;
|
||||
class HealthTableIF;
|
||||
|
||||
using HeaterPair = std::pair<HealthDevice*, gpioId_t>;
|
||||
using HeaterPair = std::pair<HeaterHealthDev*, gpioId_t>;
|
||||
|
||||
struct HeaterHelper {
|
||||
public:
|
||||
|
12
mission/tcs/HeaterHealthDev.cpp
Normal file
12
mission/tcs/HeaterHealthDev.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include "HeaterHealthDev.h"
|
||||
|
||||
HeaterHealthDev::HeaterHealthDev(object_id_t setObjectId, MessageQueueId_t parentQueue)
|
||||
: HealthDevice(setObjectId, parentQueue) {}
|
||||
|
||||
ReturnValue_t HeaterHealthDev::setHealth(HealthState health) {
|
||||
// Does not make sense for a simple heater.
|
||||
if (health == HealthState::NEEDS_RECOVERY) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return HealthDevice::setHealth(health);
|
||||
}
|
12
mission/tcs/HeaterHealthDev.h
Normal file
12
mission/tcs/HeaterHealthDev.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef MISSION_TCS_HEATERHEALTHDEV_H_
|
||||
#define MISSION_TCS_HEATERHEALTHDEV_H_
|
||||
#include <fsfw/devicehandlers/HealthDevice.h>
|
||||
|
||||
class HeaterHealthDev : public HealthDevice {
|
||||
public:
|
||||
HeaterHealthDev(object_id_t setObjectId, MessageQueueId_t parentQueue);
|
||||
|
||||
ReturnValue_t setHealth(HealthState health) override;
|
||||
};
|
||||
|
||||
#endif /* MISSION_TCS_HEATERHEALTHDEV_H_ */
|
@ -47,8 +47,8 @@ TEST_CASE("Thermal Controller", "[ThermalController]") {
|
||||
|
||||
CommandMessage modeMessage;
|
||||
|
||||
ModeMessage::setModeMessage(&modeMessage, ModeMessage::CMD_MODE_COMMAND,
|
||||
HasModesIF::MODE_ON, HasModesIF::SUBMODE_NONE);
|
||||
ModeMessage::setModeMessage(&modeMessage, ModeMessage::CMD_MODE_COMMAND, HasModesIF::MODE_ON,
|
||||
HasModesIF::SUBMODE_NONE);
|
||||
|
||||
MessageQueueIF* commandQueue =
|
||||
QueueFactory::instance()->createMessageQueue(5, MessageQueueMessage::MAX_MESSAGE_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user