Robin Mueller
64e1355e06
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
#include "TemperatureSensorInserter.h"
|
|
|
|
#include <objects/systemObjectList.h>
|
|
|
|
#include <cmath>
|
|
#include <cstdlib>
|
|
|
|
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId,
|
|
const Max31865DummyMap& tempSensorDummies_,
|
|
const Tmp1075DummyMap& tempTmpSensorDummies_)
|
|
: SystemObject(objects::THERMAL_TEMP_INSERTER),
|
|
max31865DummyMap(tempSensorDummies_),
|
|
tmp1075DummyMap(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;
|
|
}
|