diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 208999c2..0d166600 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -1708,11 +1708,11 @@ ReturnValue_t CoreController::timeFileHandler() { } std::string fileName = currMntPrefix + TIME_FILE; std::ofstream timeFile(fileName); - if (not timeFile.good()) { - sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) - << std::endl; - return RETURN_FAILED; - } +// if (not timeFile.good()) { +// sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) +// << std::endl; +// return RETURN_FAILED; +// } timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl; } return RETURN_OK; diff --git a/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h b/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h index 8b93515d..ee16339d 100644 --- a/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h +++ b/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h @@ -29,6 +29,9 @@ static const DeviceCommandId_t TC_MODE_REPLAY = 16; static const DeviceCommandId_t TC_CAM_CMD_SEND = 17; static const DeviceCommandId_t TC_MODE_IDLE = 18; static const DeviceCommandId_t TM_CAM_CMD_RPT = 19; +static const DeviceCommandId_t SET_UART_TX_TRISTATE = 20; +static const DeviceCommandId_t RELEASE_UART_TX = 21; + // Will reset the sequence count of the OBSW static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50; diff --git a/linux/devices/ploc/PlocMPSoCHandler.cpp b/linux/devices/ploc/PlocMPSoCHandler.cpp index 9ca90bcc..da0b0071 100644 --- a/linux/devices/ploc/PlocMPSoCHandler.cpp +++ b/linux/devices/ploc/PlocMPSoCHandler.cpp @@ -99,6 +99,20 @@ void PlocMPSoCHandler::performOperationHook() { ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, const uint8_t* data, size_t size) { ReturnValue_t result = RETURN_OK; + switch(actionId) { + case mpsoc::SET_UART_TX_TRISTATE: { + uartIsolatorSwitch.pullLow(); + return EXECUTION_FINISHED; + break; + } + case mpsoc::RELEASE_UART_TX: { + uartIsolatorSwitch.pullHigh(); + return EXECUTION_FINISHED; + break; + default: + break; + } + } if (plocMPSoCHelperExecuting) { return MPSoCReturnValuesIF::MPSOC_HELPER_EXECUTING; @@ -267,6 +281,8 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() { this->insertInCommandMap(mpsoc::TC_MODE_REPLAY); this->insertInCommandMap(mpsoc::TC_MODE_IDLE); this->insertInCommandMap(mpsoc::TC_CAM_CMD_SEND); + this->insertInCommandMap(mpsoc::RELEASE_UART_TX); + this->insertInCommandMap(mpsoc::SET_UART_TX_TRISTATE); this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT); this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_REPORT); this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT); diff --git a/linux/devices/ploc/PlocSupervisorHandler.cpp b/linux/devices/ploc/PlocSupervisorHandler.cpp index cc767037..ebebcb44 100644 --- a/linux/devices/ploc/PlocSupervisorHandler.cpp +++ b/linux/devices/ploc/PlocSupervisorHandler.cpp @@ -859,7 +859,6 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) { } case supv::APID_ACK_SUCCESS: { setNextReplyId(); - handleSpecialAcknowledgments(data); break; } default: { @@ -887,6 +886,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data) switch (apid) { case (supv::APID_EXE_SUCCESS): { + handleSpecialExecutionReport(data); break; } case (supv::APID_EXE_FAILURE): { @@ -1813,17 +1813,17 @@ ReturnValue_t PlocSupervisorHandler::eventSubscription() { return result; } -void PlocSupervisorHandler::handleSpecialAcknowledgments(const uint8_t* data) { +void PlocSupervisorHandler::handleSpecialExecutionReport(const uint8_t* data) { DeviceCommandId_t commandId = getPendingCommand(); switch(commandId) { case supv::READ_GPIO: { - supv::AcknowledgmentReport ack; - ack.addWholeData(data, supv::SIZE_ACK_REPORT); - uint16_t gpioState = ack.getStatusCode(); + supv::ExecutionReport exe; + exe.addWholeData(data, supv::SIZE_EXE_REPORT); + uint16_t gpioState = exe.getStatusCode(); #if OBSW_DEBUG_PLOC_SUPERVISOR == 1 sif::info << "PlocsupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl; #endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */ - handleDeviceTM(reinterpret_cast(&gpioState), sizeof(gpioState), supv::ACK_REPORT); + handleDeviceTM(reinterpret_cast(&gpioState), sizeof(gpioState), supv::EXE_REPORT); break; } default: diff --git a/linux/devices/ploc/PlocSupervisorHandler.h b/linux/devices/ploc/PlocSupervisorHandler.h index 9fa1bed3..efab17c0 100644 --- a/linux/devices/ploc/PlocSupervisorHandler.h +++ b/linux/devices/ploc/PlocSupervisorHandler.h @@ -351,9 +351,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase { ReturnValue_t eventSubscription(); /** - * @brief Handles acknowledgment reports which contains additional informations in the data field + * @brief Handles execution reports which contains additional information in the data field */ - void handleSpecialAcknowledgments(const uint8_t* data); + void handleSpecialExecutionReport(const uint8_t* data); }; #endif /* MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ */