diff --git a/linux/devices/Max31865RtdLowlevelHandler.cpp b/linux/devices/Max31865RtdLowlevelHandler.cpp index 38a9ac11..e75dfbee 100644 --- a/linux/devices/Max31865RtdLowlevelHandler.cpp +++ b/linux/devices/Max31865RtdLowlevelHandler.cpp @@ -143,7 +143,7 @@ ReturnValue_t Max31865RtdReader::periodicReadHandling() { auto result = returnvalue::OK; MutexGuard mg(readerMutex); if (mg.getLockResult() != returnvalue::OK) { - sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl; + sif::warning << "Max31865RtdReader::periodicReadHandling: Mutex lock failed" << std::endl; return returnvalue::FAILED; } // Now read the RTD values @@ -282,7 +282,13 @@ ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* se } break; } - case (EiveMax31855::RtdCommands::CFG): + case (EiveMax31855::RtdCommands::CFG): { + ReturnValue_t result = writeCfgReg(rtdCookie->spiCookie, BASE_CFG); + if (result != returnvalue::OK) { + handleSpiError(rtdCookie, result, "writeCfgReg"); + } + break; + } default: { // TODO: Only implement if needed break; diff --git a/mission/devices/Max31865EiveHandler.cpp b/mission/devices/Max31865EiveHandler.cpp index 95dbe214..433f7b58 100644 --- a/mission/devices/Max31865EiveHandler.cpp +++ b/mission/devices/Max31865EiveHandler.cpp @@ -69,7 +69,8 @@ ReturnValue_t Max31865EiveHandler::buildCommandFromCommand(DeviceCommandId_t dev switch (cmdTyped) { case (EiveMax31855::RtdCommands::ON): case (EiveMax31855::RtdCommands::ACTIVE): - case (EiveMax31855::RtdCommands::OFF): { + case (EiveMax31855::RtdCommands::OFF): + case (EiveMax31855::RtdCommands::CFG): { simpleCommand(cmdTyped); break; } @@ -77,9 +78,6 @@ ReturnValue_t Max31865EiveHandler::buildCommandFromCommand(DeviceCommandId_t dev case (EiveMax31855::RtdCommands::HIGH_TRESHOLD): { break; } - case (EiveMax31855::RtdCommands::CFG): { - break; - } default: return NOTHING_TO_SEND; } @@ -118,6 +116,7 @@ void Max31865EiveHandler::fillCommandAndReplyMap() { insertInCommandMap(EiveMax31855::RtdCommands::ON); insertInCommandMap(EiveMax31855::RtdCommands::ACTIVE); insertInCommandMap(EiveMax31855::RtdCommands::OFF); + insertInCommandMap(EiveMax31855::RtdCommands::CFG); insertInReplyMap(EiveMax31855::RtdCommands::EXCHANGE_SET_ID, 200, &sensorDataset, 0, true); }