we need a dummy heater handler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-11-24 16:40:59 +01:00
parent 17a336ba0a
commit f932c4c2c5
11 changed files with 94 additions and 161 deletions

View File

@ -16,7 +16,7 @@
ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater)
: ExtendedControllerBase(objectId),
heater(heater),
heaterHandler(heater),
sensorTemperatures(this),
susTemperatures(this),
deviceTemperatures(this),

View File

@ -8,20 +8,25 @@
#include <mission/devices/devicedefinitions/SusDefinitions.h>
#include <mission/devices/devicedefinitions/Tmp1075Definitions.h>
#include "../devices/HeaterHandler.h"
/**
* NOP Limit: Hard limit for device, usually from datasheet. Device damage is possible lif NOP limit
* is exceeded.
* OP Limit: Soft limit. Device should be switched off or TCS controller should take action if the limit
* is exceeded to avoid reaching NOP limit
* OP Limit: Soft limit. Device should be switched off or TCS controller should take action if the
* limit is exceeded to avoid reaching NOP limit
*/
struct TempLimits {
TempLimits(float nopLowerLimit, float opLowerLimit, float opUpperLimit, float nopUpperLimit) : opLowerLimit(opLowerLimit), opUpperLimit(opUpperLimit), nopLowerLimit(nopLowerLimit), nopUpperLimit(nopUpperLimit) {}
TempLimits(float nopLowerLimit, float opLowerLimit, float opUpperLimit, float nopUpperLimit)
: opLowerLimit(opLowerLimit),
opUpperLimit(opUpperLimit),
nopLowerLimit(nopLowerLimit),
nopUpperLimit(nopUpperLimit) {}
float opLowerLimit;
float opUpperLimit;
float nopLowerLimit;
float nopUpperLimit;
//TODO define limits
// TODO define limits
};
class ThermalController : public ExtendedControllerBase {
@ -50,6 +55,8 @@ class ThermalController : public ExtendedControllerBase {
InternalState internalState = InternalState::STARTUP;
HeaterHandler& heaterHandler;
thermalControllerDefinitions::SensorTemperatures sensorTemperatures;
thermalControllerDefinitions::SusTemperatures susTemperatures;
thermalControllerDefinitions::DeviceTemperatures deviceTemperatures;
@ -91,24 +98,23 @@ class ThermalController : public ExtendedControllerBase {
SUS::SusDataset susSet10;
SUS::SusDataset susSet11;
//TempLimits
//TempLimits plocHeatspreaderLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
//TempLimits plocMissionBoardLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
// TempLimits
// TempLimits plocHeatspreaderLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
// TempLimits plocMissionBoardLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
TempLimits cameraLimits = TempLimits(-40.0, -30.0, 65.0, 85.0);
TempLimits dacHeatspreaderLimits = TempLimits(-65.0, -40.0, 118.0, 150.0);
TempLimits strLimits = TempLimits(-30.0, -20.0, 70.0, 80.0);
TempLimits rw1Limits = TempLimits(-40.0, -40.0, 85.0, 85.0);
//TempLimits droLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
// TempLimits droLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
TempLimits scexLimits = TempLimits(-60.0, -40.0, 85.0, 150.0);
//TempLimits x8Limits = TempLimits(-20.0, 70.0, -30.0, 80.0);
//TempLimits hpaLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
//TempLimits txModuleLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
//TempLimits mpaLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
TempLimits acuLimits = TempLimits(-55.0, -35.0, 85.0, 150.0); //TODO nopLimits
TempLimits plpcduHeatspreaderLimits = TempLimits(-65.0, -40.0, 85.0, 125.0); //TODO check
// TempLimits x8Limits = TempLimits(-20.0, 70.0, -30.0, 80.0);
// TempLimits hpaLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
// TempLimits txModuleLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
// TempLimits mpaLimits = TempLimits(-20.0, 70.0, -30.0, 80.0);
TempLimits acuLimits = TempLimits(-55.0, -35.0, 85.0, 150.0); // TODO nopLimits
TempLimits plpcduHeatspreaderLimits = TempLimits(-65.0, -40.0, 85.0, 125.0); // TODO check
TempLimits tcsBoardLimits = TempLimits(-60.0, -40.0, 85.0, 130.0);
TempLimits magnettorquerLimits = TempLimits(-40.0, -30.0, 70.0, 80.0); //TODO nopLimits
TempLimits magnettorquerLimits = TempLimits(-40.0, -30.0, 70.0, 80.0); // TODO nopLimits
// Initial delay to make sure all pool variables have been initialized their owners
Countdown initialCountdown = Countdown(DELAY);