add recovery handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-09-07 16:05:51 +02:00
parent 58961efb3f
commit c51fbb9074
Signed by: muellerr
GPG Key ID: FCE0B2BD2195142F

View File

@ -107,6 +107,10 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8
dataset.tempC = thermal::INVALID_TEMPERATURE; dataset.tempC = thermal::INVALID_TEMPERATURE;
std::memset(dataset.channels.value, 0, sizeof(dataset.channels.value)); std::memset(dataset.channels.value, 0, sizeof(dataset.channels.value));
} else { } else {
if (invalidMsgCounter > 0) {
triggerEvent(TEMPERATURE_ALL_ONES_RECOVERY, invalidMsgCounter);
invalidMsgCounter = 0;
}
dataset.setValidity(true, true); dataset.setValidity(true, true);
dataset.tempC = max1227::getTemperature(reply->tempRaw); dataset.tempC = max1227::getTemperature(reply->tempRaw);
std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw)); std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw));