From fac688d4c9efe33107fb3d2edd9a3c85032a849d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Apr 2024 17:33:11 +0200 Subject: [PATCH] compiles again --- linux/payload/FreshMpsocHandler.cpp | 3 ++- linux/payload/SerialConfig.h | 8 ++++---- mission/pollingSeqTables.cpp | 13 +++++++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/linux/payload/FreshMpsocHandler.cpp b/linux/payload/FreshMpsocHandler.cpp index 84329509..e979600f 100644 --- a/linux/payload/FreshMpsocHandler.cpp +++ b/linux/payload/FreshMpsocHandler.cpp @@ -51,6 +51,7 @@ void FreshMpsocHandler::performDeviceOperation(uint8_t opCode) { } void FreshMpsocHandler::performDefaultDeviceOperation() { + handleQueue(); if (transitionActive) { if (targetMode == MODE_ON or targetMode == MODE_NORMAL) { handleTransitionToOn(); @@ -99,7 +100,7 @@ void FreshMpsocHandler::performDefaultDeviceOperation() { } ReturnValue_t FreshMpsocHandler::handleCommandMessage(CommandMessage* message) { - return FreshDeviceHandlerBase::handleCommandMessage(message); + return returnvalue::FAILED; } ReturnValue_t FreshMpsocHandler::initialize() { diff --git a/linux/payload/SerialConfig.h b/linux/payload/SerialConfig.h index c72071f0..2ef8ccdf 100644 --- a/linux/payload/SerialConfig.h +++ b/linux/payload/SerialConfig.h @@ -29,9 +29,10 @@ class SerialConfig : public CookieIF { * One stop bit */ SerialConfig(std::string deviceFile, UartBaudRate baudrate, size_t maxReplyLen, - UartModes uartMode = UartModes::NON_CANONICAL); + UartModes uartMode = UartModes::NON_CANONICAL) + : deviceFile(deviceFile), baudrate(baudrate), maxReplyLen(maxReplyLen), uartMode(uartMode) {} - virtual ~SerialConfig(); + virtual ~SerialConfig() = default; UartBaudRate getBaudrate() const { return baudrate; } size_t getMaxReplyLen() const { return maxReplyLen; } @@ -59,11 +60,10 @@ class SerialConfig : public CookieIF { void setOneStopBit() { stopBits = StopBits::ONE_STOP_BIT; } private: - const object_id_t handlerId; std::string deviceFile; - const UartModes uartMode; UartBaudRate baudrate; size_t maxReplyLen = 0; + const UartModes uartMode; Parity parity = Parity::NONE; BitsPerWord bitsPerWord = BitsPerWord::BITS_8; StopBits stopBits = StopBits::ONE_STOP_BIT; diff --git a/mission/pollingSeqTables.cpp b/mission/pollingSeqTables.cpp index b6e99899..9a1a1324 100644 --- a/mission/pollingSeqTables.cpp +++ b/mission/pollingSeqTables.cpp @@ -10,6 +10,7 @@ #include "OBSWConfig.h" #include "eive/definitions.h" #include "eive/objects.h" +#include "linux/payload/FreshMpsocHandler.h" #include "linux/payload/FreshSupvHandler.h" #ifndef RPI_TEST_ADIS16507 @@ -617,17 +618,21 @@ ReturnValue_t pst::pstPayload(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0, FreshSupvHandler::OpCode::DEFAULT_OPERATION); - // Two COM TM steps, which might cover telemetry which takes a bit longer to be sent. + // Parse TM with a bit of delay. Two COM steps which might cover telemetry wehich takes a bit + // longer to send thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.1, FreshSupvHandler::OpCode::PARSE_TM); thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.2, FreshSupvHandler::OpCode::PARSE_TM); + // Parse TM with a bit of delay. Two COM steps which might cover telemetry wehich takes a bit + // longer to send + thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2, + FreshMpsocHandler::OpCode::PARSE_TM); + thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.4, + FreshMpsocHandler::OpCode::PARSE_TM); thisSequence->addSlot(objects::SCEX, length * 0.6, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SCEX, length * 0.6, DeviceHandlerIF::SEND_WRITE);