From c51fbb90745c79f50592e9017a0108f088d86ed1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 7 Sep 2023 16:05:51 +0200 Subject: [PATCH] add recovery handling --- mission/acs/SusHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mission/acs/SusHandler.cpp b/mission/acs/SusHandler.cpp index 9877ace0..287e4d2e 100644 --- a/mission/acs/SusHandler.cpp +++ b/mission/acs/SusHandler.cpp @@ -107,6 +107,10 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8 dataset.tempC = thermal::INVALID_TEMPERATURE; std::memset(dataset.channels.value, 0, sizeof(dataset.channels.value)); } else { + if (invalidMsgCounter > 0) { + triggerEvent(TEMPERATURE_ALL_ONES_RECOVERY, invalidMsgCounter); + invalidMsgCounter = 0; + } dataset.setValidity(true, true); dataset.tempC = max1227::getTemperature(reply->tempRaw); std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw));