#include "TemperatureSensorInserter.h" #include #include #include TemperatureSensorInserter::TemperatureSensorInserter( object_id_t objectId, const std::map& tempSensorDummies_, const std::map& tempTmpSensorDummies_) : SystemObject(objects::THERMAL_TEMP_INSERTER) {} ReturnValue_t TemperatureSensorInserter::initialize() { if (performTest) { if (testCase == TestCase::OVERCOOL_SYRLINKS) { } } return returnvalue::OK; } ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) { iteration++; value = sin(iteration / 80. * M_PI) * 10; /* 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; }