From 54309b512f87a0cc0fea406961226168486d9056 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 11 Jul 2023 17:29:27 +0200 Subject: [PATCH] use correct clock API --- mission/controller/ThermalController.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 553dd9c2..5f2277a9 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -1852,7 +1852,7 @@ void ThermalController::resetThermalStates() { void ThermalController::heaterSwitchHelper(heater::Switch switchNr, heater::SwitchState targetState, std::optional componentIdx) { timeval currentTime; - Clock::getClockMonotonic(¤tTime); + Clock::getClock(¤tTime); if (targetState == heater::SwitchState::ON) { heaterHandler.switchHeater(switchNr, targetState); heaterStates[switchNr].target = heater::SwitchState::ON; @@ -1879,7 +1879,7 @@ void ThermalController::heaterSwitchHelper(heater::Switch switchNr, heater::Swit void ThermalController::heaterSwitchHelperAllOff() { timeval currentTime; - Clock::getClockMonotonic(¤tTime); + Clock::getClock(¤tTime); size_t idx = 0; for (; idx < heater::Switch::NUMBER_OF_SWITCHES; idx++) { heaterHandler.switchHeater(static_cast(idx), heater::SwitchState::OFF); @@ -1901,7 +1901,7 @@ void ThermalController::crossCheckHeaterStateOfComponentsWhenHeaterGoesOff( for (unsigned j = 0; j < thermalStates.size(); j++) { if (thermalStates[j].heating and thermalStates[j].heaterSwitch == switchIdx) { timeval currentTime; - Clock::getClockMonotonic(¤tTime); + Clock::getClock(¤tTime); thermalStates[j].heating = false; thermalStates[j].heaterEndTime = currentTime.tv_sec; }