better reply result handling
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-04-11 17:29:32 +02:00
parent fa94c67e99
commit d42b6798e0
3 changed files with 19 additions and 6 deletions

View File

@ -96,7 +96,7 @@ ReturnValue_t SusPolling::readReceivedMessage(CookieIF* cookie, uint8_t** buffer
if (susIdx < 0) {
return FAILED;
}
if(susDevs[susIdx].replyResult != returnvalue::OK) {
if (susDevs[susIdx].replyResult != returnvalue::OK) {
return susDevs[susIdx].replyResult;
}
MutexGuard mg(ipcLock);
@ -170,7 +170,7 @@ ReturnValue_t SusPolling::handleSusPolling() {
susDevs[idx].ownReply.tempRaw = ((rawReply[0] & 0x0f) << 8) | rawReply[1];
// Reply is all ones. Sensor is probably off or faulty when
// it should not be.
if(susDevs[idx].ownReply.tempRaw == 0x0fff) {
if (susDevs[idx].ownReply.tempRaw == 0x0fff) {
susDevs[idx].replyResult = returnvalue::FAILED;
} else {
susDevs[idx].replyResult = returnvalue::OK;