From 2c684643b329f596a2f9c22685111ae3c95d52e9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 May 2022 16:29:57 +0200 Subject: [PATCH] some smaller fixed for new rtd handler --- linux/ObjectFactory.cpp | 2 +- mission/devices/Max31865EiveHandler.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/linux/ObjectFactory.cpp b/linux/ObjectFactory.cpp index 5dda34a0..7ed9c66f 100644 --- a/linux/ObjectFactory.cpp +++ b/linux/ObjectFactory.cpp @@ -288,7 +288,7 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF, std::array rtdCookies = {}; std::array rtds = {}; RtdFdir* rtdFdir = nullptr; - bool useDirectHandler = true; + bool useDirectHandler = false; if (not useDirectHandler) { // Create special low level reader communication interface new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF); diff --git a/mission/devices/Max31865EiveHandler.cpp b/mission/devices/Max31865EiveHandler.cpp index e90a863b..09ce8463 100644 --- a/mission/devices/Max31865EiveHandler.cpp +++ b/mission/devices/Max31865EiveHandler.cpp @@ -37,24 +37,25 @@ void Max31865EiveHandler::doShutDown() { } ReturnValue_t Max31865EiveHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { - *id = EiveMax31855::RtdCommands::EXCHANGE_SET_ID; - return RETURN_OK; + //*id = EiveMax31855::RtdCommands::EXCHANGE_SET_ID; + return NOTHING_TO_SEND; } ReturnValue_t Max31865EiveHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { + ReturnValue_t result = NOTHING_TO_SEND; if (state == InternalState::ON) { *id = EiveMax31855::RtdCommands::ON; - buildCommandFromCommand(*id, nullptr, 0); + result = buildCommandFromCommand(*id, nullptr, 0); } if (state == InternalState::ACTIVE) { *id = EiveMax31855::RtdCommands::ACTIVE; - buildCommandFromCommand(*id, nullptr, 0); + result = buildCommandFromCommand(*id, nullptr, 0); } if (state == InternalState::INACTIVE) { *id = EiveMax31855::RtdCommands::OFF; - buildCommandFromCommand(*id, nullptr, 0); + result = buildCommandFromCommand(*id, nullptr, 0); } - return NOTHING_TO_SEND; + return result; } ReturnValue_t Max31865EiveHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,