From bdd2b23ec3287beecccadc9f81785a28607fd034 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Apr 2023 10:41:10 +0200 Subject: [PATCH 1/2] test cold case camera --- dummies/TemperatureSensorInserter.cpp | 12 +++++++++++- dummies/TemperatureSensorInserter.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dummies/TemperatureSensorInserter.cpp b/dummies/TemperatureSensorInserter.cpp index cfba0ef9..62deacf4 100644 --- a/dummies/TemperatureSensorInserter.cpp +++ b/dummies/TemperatureSensorInserter.cpp @@ -15,7 +15,7 @@ TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId, tmp1075DummyMap(std::move(tempTmpSensorDummies_)) {} ReturnValue_t TemperatureSensorInserter::initialize() { - testCase = TestCase::NONE; + testCase = TestCase::COLD_CAMERA; return returnvalue::OK; } @@ -96,6 +96,16 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) { } break; } + case (TestCase::COLD_CAMERA): { + if (cycles == 15) { + sif::debug << "Setting cold CAM temperature" << std::endl; + max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(-40, true); + } + if (cycles == 30) { + sif::debug << "Setting CAM temperature back to normal" << std::endl; + max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(0, true); + } + } } cycles++; return returnvalue::OK; diff --git a/dummies/TemperatureSensorInserter.h b/dummies/TemperatureSensorInserter.h index 675bcd91..eb6cc1ba 100644 --- a/dummies/TemperatureSensorInserter.h +++ b/dummies/TemperatureSensorInserter.h @@ -31,6 +31,7 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject COLD_MGT = 3, COLD_STR = 4, COLD_STR_CONSECUTIVE = 5, + COLD_CAMERA = 6, }; int iteration = 0; uint32_t cycles = 0; From 701ecbd182dfc9dc65a6ff13de8be35e8c51bd0a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Apr 2023 10:45:01 +0200 Subject: [PATCH 2/2] disable test --- dummies/TemperatureSensorInserter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dummies/TemperatureSensorInserter.cpp b/dummies/TemperatureSensorInserter.cpp index 62deacf4..14a005aa 100644 --- a/dummies/TemperatureSensorInserter.cpp +++ b/dummies/TemperatureSensorInserter.cpp @@ -15,7 +15,7 @@ TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId, tmp1075DummyMap(std::move(tempTmpSensorDummies_)) {} ReturnValue_t TemperatureSensorInserter::initialize() { - testCase = TestCase::COLD_CAMERA; + testCase = TestCase::NONE; return returnvalue::OK; }