Merge pull request 'fixes for RPi build' (#146) from mueller/rpi-fixes into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #146
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
This commit is contained in:
Jakob Meier 2022-02-22 18:17:33 +01:00
commit 6c988ecf50
5 changed files with 11 additions and 21 deletions

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PUBLIC
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp

View File

@ -211,7 +211,7 @@ void initmission::createTestTasks(TaskFactory& factory,
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#if RPI_ADD_SPI_TEST == 1
#if OBSW_ADD_SPI_TEST_CODE == 1
result = testTask->addComponent(objects::SPI_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
@ -223,12 +223,13 @@ void initmission::createTestTasks(TaskFactory& factory,
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
}
#endif /* RPI_ADD_GPIO_TEST == 1 */
#if RPI_ADD_UART_TEST == 1
#if OBSW_ADD_UART_TEST_CODE == 1
result = testTask->addComponent(objects::UART_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
}
#endif /* RPI_ADD_GPIO_TEST == 1 */
taskVec.push_back(testTask);
bool startTestPst = true;
static_cast<void>(startTestPst);

View File

@ -1,9 +1,7 @@
#include "ObjectFactory.h"
#include <devConf.h>
#include <mission/devices/GPSHyperionHandler.h>
#include "OBSWConfig.h"
#include "devConf.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
@ -15,6 +13,7 @@
#include "linux/boardtest/SpiTestClass.h"
#include "linux/boardtest/UartTestClass.h"
#include "mission/core/GenericFactory.h"
#include "mission/devices/GPSHyperionHandler.h"
#include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/utility/TmFunnel.h"
#include "objects/systemObjectList.h"
@ -61,16 +60,6 @@ void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
#if OBSW_USE_TMTC_TCP_BRIDGE == 1
auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#else
auto tmtcBridge = new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#endif
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
GpioCookie* gpioCookie = nullptr;
static_cast<void>(gpioCookie);
@ -188,11 +177,11 @@ void ObjectFactory::produce(void* args) {
void ObjectFactory::createTestTasks() {
new TestTask(objects::TEST_TASK);
#if RPI_ADD_SPI_TEST == 1
#if OBSW_ADD_SPI_TEST_CODE == 1
new SpiTestClass(objects::SPI_TEST, gpioIF);
#endif
#if RPI_ADD_UART_TEST == 1
#if OBSW_ADD_UART_TEST_CODE == 1
new UartTestClass(objects::UART_TEST);
#else
new UartComIF(objects::UART_COM_IF);

View File

@ -1,7 +1,7 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${TARGET_NAME} PUBLIC
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
)