split up PSTs and add contd GPS handler

This commit is contained in:
2021-06-24 08:50:46 +02:00
parent cea1494649
commit 6ba3f6918d
6 changed files with 84 additions and 33 deletions

View File

@ -1,3 +1,6 @@
#include <fsfw_hal/linux/uart/UartComIF.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include <mission/devices/GPSHandler.h>
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
@ -68,6 +71,8 @@ void ObjectFactory::produce(void* args){
#if RPI_ADD_UART_TEST == 1
new UartTestClass(objects::UART_TEST);
#else
new UartComIF(objects::UART_COM_IF);
#endif
#if RPI_LOOPBACK_TEST_GPIO == 1
@ -146,4 +151,15 @@ void ObjectFactory::produce(void* args){
auto adisGyroHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF, spiCookie);
adisGyroHandler->setStartUpImmediately();
#endif /* RPI_TEST_ADIS16507 == 1 */
#if RPI_TEST_GPS_HANDLER == 1
UartCookie* uartCookie = new UartCookie(objects::GPS0_HANDLER, "/dev/serial0",
UartModes::CANONICAL, 9600, 1024);
uartCookie->setToFlushInput(true);
uartCookie->setReadCycles(6);
GPSHandler* gpsHandler = new GPSHandler(objects::GPS0_HANDLER,
objects::UART_COM_IF, uartCookie);
gpsHandler->setStartUpImmediately();
#endif
}

View File

@ -7,6 +7,7 @@
#define RPI_LOOPBACK_TEST_GPIO 0
#define RPI_TEST_ADIS16507 0
#define RPI_TEST_GPS_HANDLER 0
// Only one of those 2 should be enabled!
#define RPI_ADD_SPI_TEST 0