From a21e938f36529a5e1b158283dced4476d4111029 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 11 Nov 2022 11:41:40 +0100 Subject: [PATCH] renamed cookie as well --- bsp_q7s/core/ObjectFactory.cpp | 12 ++++++------ fsfw | 2 +- linux/ObjectFactory.cpp | 2 +- linux/boardtest/UartTestClass.cpp | 2 +- linux/boardtest/UartTestClass.h | 2 +- linux/devices/ScexUartReader.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index f5397e04..6dc08ca1 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -572,8 +572,8 @@ void ObjectFactory::createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitc } void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) { - UartCookie* syrlinksUartCookie = - new UartCookie(objects::SYRLINKS_HK_HANDLER, q7s::UART_SYRLINKS_DEV, uart::SYRLINKS_BAUD, + auto* syrlinksUartCookie = + new SerialCookie(objects::SYRLINKS_HK_HANDLER, q7s::UART_SYRLINKS_DEV, uart::SYRLINKS_BAUD, syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL); syrlinksUartCookie->setParityEven(); @@ -602,7 +602,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC); gpioChecker(gpioComIF->addGpios(mpsocGpioCookie), "PLOC MPSoC"); auto mpsocCookie = - new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, uart::PLOC_MPSOC_BAUD, + new SerialCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, uart::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL); mpsocCookie->setNoFixedSizeReply(); auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER); @@ -619,7 +619,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit supvGpioCookie->addGpio(gpioIds::ENABLE_SUPV_UART, gpioConfigSupv); gpioComIF->addGpios(supvGpioCookie); auto supervisorCookie = - new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, q7s::UART_PLOC_SUPERVSIOR_DEV, + new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, q7s::UART_PLOC_SUPERVSIOR_DEV, uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL); supervisorCookie->setNoFixedSizeReply(); auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER); @@ -905,8 +905,8 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) { } void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) { - UartCookie* starTrackerCookie = - new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD, + auto* starTrackerCookie = + new SerialCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL); starTrackerCookie->setNoFixedSizeReply(); StrHelper* strHelper = new StrHelper(objects::STR_HELPER); diff --git a/fsfw b/fsfw index 39946bff..e03e7f52 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 39946bff58db7c5ac9016ca3156abb059560d9cb +Subproject commit e03e7f5260eb92d1903188c5ea14ea01616600ae diff --git a/linux/ObjectFactory.cpp b/linux/ObjectFactory.cpp index 21f884f9..e35d7e96 100644 --- a/linux/ObjectFactory.cpp +++ b/linux/ObjectFactory.cpp @@ -326,7 +326,7 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF, void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher, SdCardMountedIF& mountedIF, bool onImmediately, std::optional switchId) { - auto* cookie = new UartCookie(objects::SCEX, uartDev, uart::SCEX_BAUD, 4096); + auto* cookie = new SerialCookie(objects::SCEX, uartDev, uart::SCEX_BAUD, 4096); cookie->setTwoStopBits(); // cookie->setParityEven(); auto scexUartReader = new ScexUartReader(objects::SCEX_UART_READER); diff --git a/linux/boardtest/UartTestClass.cpp b/linux/boardtest/UartTestClass.cpp index 2c914d74..51ea237f 100644 --- a/linux/boardtest/UartTestClass.cpp +++ b/linux/boardtest/UartTestClass.cpp @@ -164,7 +164,7 @@ void UartTestClass::scexInit() { #else std::string devname = "/dev/ul-scex"; #endif - uartCookie = new UartCookie(this->getObjectId(), devname, UartBaudRate::RATE_57600, 4096); + uartCookie = new SerialCookie(this->getObjectId(), devname, UartBaudRate::RATE_57600, 4096); reader->setDebugMode(false); ReturnValue_t result = reader->initializeInterface(uartCookie); if (result != OK) { diff --git a/linux/boardtest/UartTestClass.h b/linux/boardtest/UartTestClass.h index 6304724b..05776bc0 100644 --- a/linux/boardtest/UartTestClass.h +++ b/linux/boardtest/UartTestClass.h @@ -57,7 +57,7 @@ class UartTestClass : public TestTask { scex::Cmds currCmd = scex::Cmds::PING; TestModes mode = TestModes::GPS; DleEncoder dleEncoder = DleEncoder(); - UartCookie* uartCookie = nullptr; + SerialCookie* uartCookie = nullptr; size_t encodedLen = 0; lwgps_t gpsData = {}; struct termios tty = {}; diff --git a/linux/devices/ScexUartReader.cpp b/linux/devices/ScexUartReader.cpp index ce59472d..6f615014 100644 --- a/linux/devices/ScexUartReader.cpp +++ b/linux/devices/ScexUartReader.cpp @@ -84,7 +84,7 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) { } ReturnValue_t ScexUartReader::initializeInterface(CookieIF *cookie) { - UartCookie *uartCookie = dynamic_cast(cookie); + SerialCookie *uartCookie = dynamic_cast(cookie); if (uartCookie == nullptr) { return FAILED; }