diff --git a/bsp_linux_board/ObjectFactory.cpp b/bsp_linux_board/ObjectFactory.cpp index f4a7320c..fa5c35dd 100644 --- a/bsp_linux_board/ObjectFactory.cpp +++ b/bsp_linux_board/ObjectFactory.cpp @@ -1,6 +1,3 @@ -#include -#include -#include #include "ObjectFactory.h" #include "objects/systemObjectList.h" @@ -17,6 +14,7 @@ #include "mission/core/GenericFactory.h" #include "mission/utility/TmFunnel.h" +#include #include "mission/devices/MGMHandlerLIS3MDL.h" #include "mission/devices/MGMHandlerRM3100.h" #include "mission/devices/GyroADIS16507Handler.h" @@ -28,8 +26,13 @@ #include "fsfw/tasks/TaskFactory.h" /* UDP server includes */ +#if OBSW_USE_TMTC_TCP_BRIDGE == 1 +#include +#include +#else #include "fsfw/osal/common/UdpTmTcBridge.h" #include "fsfw/osal/common/UdpTcPollingTask.h" +#endif #include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h" #include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h" @@ -37,6 +40,8 @@ #include "fsfw_hal/common/gpio/GpioCookie.h" #include "fsfw_hal/linux/spi/SpiCookie.h" #include "fsfw_hal/linux/spi/SpiComIF.h" +#include +#include void Factory::setStaticFrameworkObjectIds() { PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR; @@ -59,8 +64,13 @@ void ObjectFactory::produce(void* args){ Factory::setStaticFrameworkObjectIds(); ObjectFactory::produceGenericObjects(); +#if OBSW_USE_TMTC_TCP_BRIDGE == 1 + new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR); + new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE); +#else new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR); new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE); +#endif GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF); GpioCookie* gpioCookie = nullptr; @@ -162,7 +172,7 @@ void ObjectFactory::produce(void* args){ uartCookie->setToFlushInput(true); uartCookie->setReadCycles(6); GPSHyperionHandler* gpsHandler = new GPSHyperionHandler(objects::GPS0_HANDLER, - objects::UART_COM_IF, uartCookie, true); + objects::UART_COM_IF, uartCookie, false); gpsHandler->setStartUpImmediately(); #endif diff --git a/mission/devices/GPSHyperionHandler.cpp b/mission/devices/GPSHyperionHandler.cpp index bd34591a..8f8bd229 100644 --- a/mission/devices/GPSHyperionHandler.cpp +++ b/mission/devices/GPSHyperionHandler.cpp @@ -144,7 +144,7 @@ ReturnValue_t GPSHyperionHandler::initializeLocalDataPool( void GPSHyperionHandler::fillCommandAndReplyMap() { // Reply length does not matter, packets should always arrive periodically - insertInReplyMap(GpsHyperion::GPS_REPLY, 4, nullptr, 0, true); + insertInReplyMap(GpsHyperion::GPS_REPLY, 4, &gpsSet, 0, true); } void GPSHyperionHandler::modeChanged() { diff --git a/tmtc b/tmtc index 84656b90..25f8543a 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 84656b90fc44ab72fb95518410fea3373d1fdf18 +Subproject commit 25f8543a8d5e578d40f589019ed065cc50f5074b