relax sus fdir

This commit is contained in:
2023-06-13 07:48:32 +02:00
parent de35764ede
commit 196823b2e0
17 changed files with 56 additions and 21 deletions

View File

@ -87,6 +87,21 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8
commandExecuted = true;
}
PoolReadGuard pg(&dataset);
// In a previous stricter FDIR variant, this was considered faulty communication and was already
// handled in the communication interface. However, the SUS devices probably glitch in orbit,
// so the FDIR was relaxed. The fault case check previously used now only leads to the dataset
// being marked invalid, shifting more responsibility of determining and setting SUS devices
// faulty to the operator.
// UPDATE: Step1: First determine how often and whether this happens at all
if (reply->tempRaw == 0xfff) {
if (faultyDataEventCd.hasTimedOut()) {
triggerEvent(TEMPERATURE_IS_ALL_ONES);
faultyDataEventCd.resetTimer();
}
// dataset.setValidity(false, true);
// return returnvalue::OK;
}
dataset.setValidity(true, true);
dataset.tempC = max1227::getTemperature(reply->tempRaw);
std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw));