eive-obsw/dummies/TemperatureSensorInserter.cpp
Robin Mueller d01308f0ba
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
reduced number of errors for hosted build
2023-02-09 17:17:58 +01:00

41 lines
1.3 KiB
C++

#include "TemperatureSensorInserter.h"
#include <objects/systemObjectList.h>
#include <cmath>
#include <cstdlib>
#include <utility>
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId,
Max31865DummyMap tempSensorDummies_,
Tmp1075DummyMap tempTmpSensorDummies_)
: SystemObject(objects::THERMAL_TEMP_INSERTER),
max31865DummyMap(std::move(tempSensorDummies_)),
tmp1075DummyMap(std::move(tempTmpSensorDummies_)) {}
ReturnValue_t TemperatureSensorInserter::initialize() {
if (performTest) {
if (testCase == TestCase::COOL_SYRLINKS) {
}
}
return returnvalue::OK;
}
ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
/*
ReturnValue_t result = max31865PlocHeatspreaderSet.read();
if (result != returnvalue::OK) {
sif::warning << "Failed to read temperature from MAX31865 dataset" << std::endl;
}
max31865PlocHeatspreaderSet.rtdValue = value - 5;
max31865PlocHeatspreaderSet.temperatureCelcius = value;
if ((iteration % 100) < 20) {
max31865PlocHeatspreaderSet.setValidity(false, true);
} else {
max31865PlocHeatspreaderSet.setValidity(true, true);
}
max31865PlocHeatspreaderSet.commit();
*/
return returnvalue::OK;
}