rtd dataset
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#include "Max31865EiveHandler.h"
|
||||
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
|
||||
Max31865EiveHandler::Max31865EiveHandler(object_id_t objectId, object_id_t comIF,
|
||||
CookieIF* comCookie)
|
||||
: DeviceHandlerBase(objectId, comIF, comCookie, nullptr),
|
||||
@ -154,6 +156,15 @@ ReturnValue_t Max31865EiveHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
// calculate approximation
|
||||
float approxTemp = exchangeStruct.adcCode / 32.0 - 256.0;
|
||||
|
||||
PoolReadGuard pg(&sensorDataset);
|
||||
if (pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Max31865EiveHandler: Failed to read sensor dataset" << std::endl;
|
||||
sensorDataset.temperatureCelcius.setValid(false);
|
||||
return RETURN_OK;
|
||||
}
|
||||
sensorDataset.temperatureCelcius = approxTemp;
|
||||
sensorDataset.temperatureCelcius.setValid(true);
|
||||
|
||||
if (debugMode) {
|
||||
if (debugDivider.checkAndIncrement()) {
|
||||
sif::info << "Max31865: " << std::setw(20) << std::left << locString << std::right
|
||||
|
Reference in New Issue
Block a user