diff --git a/dummies/TemperatureSensorInserter.cpp b/dummies/TemperatureSensorInserter.cpp index 58748e87..efbec2d0 100644 --- a/dummies/TemperatureSensorInserter.cpp +++ b/dummies/TemperatureSensorInserter.cpp @@ -5,23 +5,22 @@ #include #include -TemperatureSensorInserter::TemperatureSensorInserter( - object_id_t objectId, const std::map& tempSensorDummies_, - const std::map& tempTmpSensorDummies_) - : SystemObject(objects::THERMAL_TEMP_INSERTER) {} +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::OVERCOOL_SYRLINKS) { + if (testCase == TestCase::COOL_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) { diff --git a/dummies/TemperatureSensorInserter.h b/dummies/TemperatureSensorInserter.h index cf858576..ff3f939e 100644 --- a/dummies/TemperatureSensorInserter.h +++ b/dummies/TemperatureSensorInserter.h @@ -8,9 +8,11 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject { public: - explicit TemperatureSensorInserter( - object_id_t objectId, const std::map& tempSensorDummies_, - const std::map& tempTmpSensorDummies_); + using Max31865DummyMap = std::map; + using Tmp1075DummyMap = std::map; + explicit TemperatureSensorInserter(object_id_t objectId, + const Max31865DummyMap& tempSensorDummies_, + const Tmp1075DummyMap& tempTmpSensorDummies_); ReturnValue_t initialize() override; @@ -18,11 +20,12 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject ReturnValue_t performOperation(uint8_t opCode) override; private: - enum TestCase { OVERCOOL_SYRLINKS = 0 }; + Max31865DummyMap max31865DummyMap; + Tmp1075DummyMap tmp1075DummyMap; + enum TestCase { NONE = 0, COOL_SYRLINKS = 1 }; int iteration = 0; bool performTest = false; - float value = 0; - TestCase testCase; + TestCase testCase = TestCase::NONE; // void noise(); };