Merge branch 'develop' into continue_tcs_tests
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <mission/tcs/Max31865EiveHandler.h>
|
||||
|
||||
#include "fsfw/thermal/tcsDefinitions.h"
|
||||
|
||||
Max31865EiveHandler::Max31865EiveHandler(object_id_t objectId, object_id_t comIF,
|
||||
CookieIF* comCookie)
|
||||
: DeviceHandlerBase(objectId, comIF, comCookie, nullptr),
|
||||
@ -152,6 +154,15 @@ ReturnValue_t Max31865EiveHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
transitionOk = true;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
// If the 15 received bits are all ones, this is considered a case where the device does not
|
||||
// work because it does not drive the MISO line. This can happens if the sensor is broken
|
||||
// or off.
|
||||
if (exchangeStruct.adcCode == 0x7fff) {
|
||||
PoolReadGuard pg(&sensorDataset);
|
||||
sensorDataset.temperatureCelcius.setValid(false);
|
||||
sensorDataset.temperatureCelcius = thermal::INVALID_TEMPERATURE;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
// Calculate resistance
|
||||
float rtdValue = exchangeStruct.adcCode * EiveMax31855::RTD_RREF_PT1000 / INT16_MAX;
|
||||
|
Reference in New Issue
Block a user