struct heaterStates and more
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-02-22 21:46:56 +01:00
parent 0fa1bab94d
commit 9a7779cffb
12 changed files with 159 additions and 122 deletions

View File

@ -36,14 +36,21 @@ struct TempLimits {
float nopUpperLimit;
};
struct ThermalState {
struct ThermalState {
uint8_t errorCounter;
bool heating;
uint32_t heaterStartTime;
uint32_t heaterStartTime;
};
enum ThermalComponents: uint8_t {
//TODO: Großbuchstaben
struct HeaterState {
bool switchOnTransition;
bool switchOffTransition;
uint8_t heaterSwitchOnControlErrorCounter;
uint8_t heaterSwitchOffControlErrorCounter;
};
enum ThermalComponents : uint8_t {
// TODO: Großbuchstaben
NONE = 0,
acsBoard = 1,
mgt = 2,
@ -189,8 +196,8 @@ class ThermalController : public ExtendedControllerBase {
ThermalComponents thermalComponent = NONE;
bool redSwitchNrInUse = false;
bool componentAboveCutOffLimit = false;
std::array<ThermalState, 30> thermalStates {};
std::array<ThermalState, 30> thermalStates{};
std::array<HeaterState, 7> heaterStates{};
// Initial delay to make sure all pool variables have been initialized their owners
Countdown initialCountdown = Countdown(DELAY);
@ -246,6 +253,7 @@ class ThermalController : public ExtendedControllerBase {
void ctrlTx();
void ctrlMpa();
void ctrlScexBoard();
void heaterTransitionControl();
};
#endif /* MISSION_CONTROLLER_THERMALCONTROLLER_H_ */