command to rewrite config of RTDs
EIVE/eive-obsw/pipeline/head This commit looks good Details

This commit is contained in:
Jakob Meier 2023-01-19 13:20:24 +01:00
parent f0554311a2
commit cc6c25cba6
2 changed files with 11 additions and 6 deletions

View File

@ -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;

View File

@ -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);
}