From 67037e2dae9df8226e89e6fb4ade6aa7ec5784ec Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sat, 4 Jun 2022 09:31:34 +0200 Subject: [PATCH] use memset to set invalid temperatures of cau --- mission/controller/ThermalController.cpp | 5 ++--- tmtc | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index b6cbec74..eb473a5f 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -699,9 +699,8 @@ void ThermalController::copyDevices() { if (result != RETURN_OK) { sif::warning << "ThermalController: Failed to read ACU temperatures" << std::endl; deviceTemperatures.acu.setValid(false); - deviceTemperatures.acu[0] = static_cast(INVALID_TEMPERATURE); - deviceTemperatures.acu[1] = static_cast(INVALID_TEMPERATURE); - deviceTemperatures.acu[2] = static_cast(INVALID_TEMPERATURE); + std::memset(deviceTemperatures.acu.value, INVALID_TEMPERATURE, + deviceTemperatures.acu.getSize()); } else { deviceTemperatures.acu.setValid(tempAcu.isValid()); diff --git a/tmtc b/tmtc index e2de2e02..46be9fa0 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit e2de2e0212d5af87b111e6176f3b9f20b56081df +Subproject commit 46be9fa0923f2a6a54f49f4cf6fe045361321646