add new heater health device

This commit is contained in:
2023-04-13 23:31:33 +02:00
parent aa746276ae
commit 6f67bd500b
7 changed files with 42 additions and 14 deletions

View File

@ -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)

View File

@ -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:

View 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);
}

View 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_ */