2020-09-30 17:17:01 +02:00
|
|
|
#include "ObjectFactory.h"
|
|
|
|
|
2022-09-27 17:36:19 +02:00
|
|
|
#include <bsp_linux_board/RPiSdCardManager.h>
|
2022-04-08 19:12:21 +02:00
|
|
|
#include <linux/devices/ScexUartReader.h>
|
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
#include "OBSWConfig.h"
|
2022-02-22 13:50:46 +01:00
|
|
|
#include "devConf.h"
|
2021-05-23 20:44:54 +02:00
|
|
|
#include "devices/addresses.h"
|
|
|
|
#include "devices/gpioIds.h"
|
2022-01-17 15:58:27 +01:00
|
|
|
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
|
2022-03-30 17:44:07 +02:00
|
|
|
#include "fsfw/power/DummyPowerSwitcher.h"
|
2022-01-17 15:58:27 +01:00
|
|
|
#include "fsfw/tasks/TaskFactory.h"
|
|
|
|
#include "fsfw/tmtcpacket/pus/tm.h"
|
|
|
|
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
|
|
|
#include "fsfw/tmtcservices/PusServiceBase.h"
|
2022-03-30 17:50:36 +02:00
|
|
|
#include "gpioInit.h"
|
2022-03-26 16:38:42 +01:00
|
|
|
#include "linux/ObjectFactory.h"
|
2021-06-16 18:38:06 +02:00
|
|
|
#include "linux/boardtest/LibgpiodTest.h"
|
|
|
|
#include "linux/boardtest/SpiTestClass.h"
|
|
|
|
#include "linux/boardtest/UartTestClass.h"
|
|
|
|
#include "mission/core/GenericFactory.h"
|
2022-02-22 13:50:46 +01:00
|
|
|
#include "mission/devices/GPSHyperionHandler.h"
|
2022-01-11 14:45:16 +01:00
|
|
|
#include "mission/devices/GyroADIS1650XHandler.h"
|
2022-07-08 16:39:07 +02:00
|
|
|
#include "mission/tmtc/TmFunnel.h"
|
2022-01-17 15:58:27 +01:00
|
|
|
#include "objects/systemObjectList.h"
|
|
|
|
#include "tmtc/pusIds.h"
|
2021-03-23 16:45:07 +01:00
|
|
|
|
2021-03-29 14:42:33 +02:00
|
|
|
/* UDP server includes */
|
2021-08-11 19:27:17 +02:00
|
|
|
#if OBSW_USE_TMTC_TCP_BRIDGE == 1
|
|
|
|
#include <fsfw/src/fsfw/osal/common/TcpTmTcBridge.h>
|
|
|
|
#include <fsfw/src/fsfw/osal/common/TcpTmTcServer.h>
|
|
|
|
#else
|
2021-06-16 18:38:06 +02:00
|
|
|
#include "fsfw/osal/common/UdpTcPollingTask.h"
|
2022-01-17 15:58:27 +01:00
|
|
|
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
2021-08-11 19:27:17 +02:00
|
|
|
#endif
|
2021-03-29 14:42:33 +02:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
#include <fsfw_hal/linux/uart/UartComIF.h>
|
|
|
|
#include <fsfw_hal/linux/uart/UartCookie.h>
|
|
|
|
|
|
|
|
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
|
|
|
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
|
2021-09-22 12:19:45 +02:00
|
|
|
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
|
|
|
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
|
2021-08-03 15:58:01 +02:00
|
|
|
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
|
|
|
#include "fsfw_hal/linux/rpi/GpioRPi.h"
|
|
|
|
#include "fsfw_hal/linux/spi/SpiComIF.h"
|
2022-01-17 15:58:27 +01:00
|
|
|
#include "fsfw_hal/linux/spi/SpiCookie.h"
|
2021-02-22 18:46:45 +01:00
|
|
|
|
2020-11-20 18:27:07 +01:00
|
|
|
void Factory::setStaticFrameworkObjectIds() {
|
2022-08-30 18:36:00 +02:00
|
|
|
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
|
|
|
PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL;
|
2020-09-30 17:17:01 +02:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
|
|
|
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
2020-09-30 17:17:01 +02:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
|
|
|
|
// No storage object for now.
|
|
|
|
TmFunnel::storageDestination = objects::NO_OBJECT;
|
2020-09-30 17:17:01 +02:00
|
|
|
}
|
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
void ObjectFactory::produce(void* args) {
|
|
|
|
Factory::setStaticFrameworkObjectIds();
|
|
|
|
ObjectFactory::produceGenericObjects();
|
2020-09-30 17:17:01 +02:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
|
|
|
|
GpioCookie* gpioCookie = nullptr;
|
|
|
|
static_cast<void>(gpioCookie);
|
2021-08-11 18:13:43 +02:00
|
|
|
|
2022-05-26 11:46:28 +02:00
|
|
|
SpiComIF* spiComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, spi::DEV, gpioIF);
|
2022-03-26 16:38:42 +01:00
|
|
|
static_cast<void>(spiComIF);
|
2022-03-30 17:44:07 +02:00
|
|
|
auto pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
2022-03-30 17:47:49 +02:00
|
|
|
static_cast<void>(pwrSwitcher);
|
2021-08-11 18:13:43 +02:00
|
|
|
|
2022-03-30 17:44:07 +02:00
|
|
|
#if OBSW_ADD_ACS_BOARD == 1 && defined(RASPBERRY_PI)
|
2022-03-26 16:38:42 +01:00
|
|
|
createRpiAcsBoard(gpioIF, spiDev);
|
|
|
|
#endif
|
2021-08-11 18:13:43 +02:00
|
|
|
|
2022-04-09 01:00:42 +02:00
|
|
|
#if OBSW_ADD_SUN_SENSORS == 1 || OBSW_ADD_RTD_DEVICES == 1
|
2022-03-30 17:44:07 +02:00
|
|
|
#ifdef RASPBERRY_PI
|
|
|
|
rpi::gpio::initSpiCsDecoder(gpioIF);
|
2022-03-26 16:38:42 +01:00
|
|
|
#endif
|
2022-03-31 18:04:55 +02:00
|
|
|
#endif
|
|
|
|
|
2022-09-27 17:36:19 +02:00
|
|
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
2022-09-27 18:54:48 +02:00
|
|
|
auto* sdcMan = new RPiSdCardManager("/tmp");
|
|
|
|
createScexComponents(uart::DEV, pwrSwitcher, *sdcMan, true, std::nullopt);
|
2022-05-26 12:04:27 +02:00
|
|
|
#endif
|
|
|
|
|
2022-03-31 18:04:55 +02:00
|
|
|
#if OBSW_ADD_SUN_SENSORS == 1
|
2022-03-30 17:50:13 +02:00
|
|
|
createSunSensorComponents(gpioIF, spiComIF, pwrSwitcher, spi::DEV);
|
2022-03-30 17:44:07 +02:00
|
|
|
#endif
|
|
|
|
|
2022-03-31 18:04:55 +02:00
|
|
|
#if OBSW_ADD_RTD_DEVICES == 1
|
|
|
|
createRtdComponents(spi::DEV, gpioIF, pwrSwitcher);
|
|
|
|
#endif
|
|
|
|
|
2022-03-26 16:38:42 +01:00
|
|
|
#if OBSW_ADD_TEST_CODE == 1
|
|
|
|
createTestTasks();
|
|
|
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
|
|
|
}
|
2021-08-11 18:13:43 +02:00
|
|
|
|
2022-03-26 16:38:42 +01:00
|
|
|
void ObjectFactory::createRpiAcsBoard(GpioIF* gpioIF, std::string spiDev) {
|
|
|
|
GpioCookie* gpioCookie = new GpioCookie();
|
2022-01-17 15:58:27 +01:00
|
|
|
// TODO: Missing pin for Gyro 2
|
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN, "MGM_0_LIS3",
|
2022-03-26 16:38:42 +01:00
|
|
|
gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_1_RM3100_CS, gpio::MGM_1_BCM_PIN,
|
2022-03-26 16:38:42 +01:00
|
|
|
"MGM_1_RM3100", gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_2_LIS3_CS, gpio::MGM_2_BCM_PIN, "MGM_2_LIS3",
|
2022-03-26 16:38:42 +01:00
|
|
|
gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_3_RM3100_CS, gpio::MGM_3_BCM_PIN,
|
2022-03-26 16:38:42 +01:00
|
|
|
"MGM_3_RM3100", gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
|
2022-03-26 16:38:42 +01:00
|
|
|
"GYRO_0_ADIS", gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN, "GYRO_1_L3G",
|
2022-03-26 16:38:42 +01:00
|
|
|
gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_2_ADIS_CS, gpio::GYRO_2_BCM_PIN,
|
2022-03-26 16:38:42 +01:00
|
|
|
"GYRO_2_ADIS", gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_3_L3G_CS, gpio::GYRO_3_BCM_PIN, "GYRO_3_L3G",
|
2022-03-26 16:38:42 +01:00
|
|
|
gpio::Direction::OUT, gpio::Levels::HIGH);
|
2022-01-17 15:58:27 +01:00
|
|
|
gpioIF->addGpios(gpioCookie);
|
2022-03-26 16:38:42 +01:00
|
|
|
SpiCookie* spiCookie =
|
2022-05-26 11:46:28 +02:00
|
|
|
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
|
|
|
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
2022-01-17 15:58:27 +01:00
|
|
|
auto mgmLis3Handler =
|
2022-05-26 11:46:28 +02:00
|
|
|
new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmLis3Handler->setStartUpImmediately();
|
2022-05-03 17:36:15 +02:00
|
|
|
#if OBSW_TEST_ACS == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmLis3Handler->setToGoToNormalMode(true);
|
2021-09-22 15:43:11 +02:00
|
|
|
#endif
|
2021-03-07 14:06:29 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
spiCookie =
|
2022-05-26 11:46:28 +02:00
|
|
|
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
|
|
|
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
2022-01-17 15:58:27 +01:00
|
|
|
auto mgmRm3100Handler =
|
2022-05-26 11:46:28 +02:00
|
|
|
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmRm3100Handler->setStartUpImmediately();
|
2022-05-03 17:36:15 +02:00
|
|
|
#if OBSW_TEST_ACS == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
2021-09-22 15:43:11 +02:00
|
|
|
#endif
|
2021-02-24 11:36:35 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
spiCookie =
|
2022-05-26 11:46:28 +02:00
|
|
|
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
|
|
|
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmLis3Handler =
|
2022-05-26 11:46:28 +02:00
|
|
|
new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmLis3Handler->setStartUpImmediately();
|
2022-05-03 17:36:15 +02:00
|
|
|
#if OBSW_TEST_ACS == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmLis3Handler->setToGoToNormalMode(true);
|
2021-09-22 15:43:11 +02:00
|
|
|
#endif
|
2021-09-22 14:04:39 +02:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
spiCookie =
|
2022-05-26 11:46:28 +02:00
|
|
|
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
|
|
|
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmRm3100Handler =
|
2022-05-26 11:46:28 +02:00
|
|
|
new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmRm3100Handler->setStartUpImmediately();
|
2022-05-03 17:36:15 +02:00
|
|
|
#if OBSW_TEST_ACS == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
2021-09-22 15:43:11 +02:00
|
|
|
#endif
|
2021-09-22 14:04:39 +02:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
spiCookie =
|
2022-05-26 11:46:28 +02:00
|
|
|
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
|
2022-01-17 15:58:27 +01:00
|
|
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
2022-05-26 11:46:28 +02:00
|
|
|
auto adisHandler =
|
|
|
|
new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
|
|
|
ADIS1650X::Type::ADIS16505);
|
|
|
|
adisHandler->setStartUpImmediately();
|
|
|
|
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
|
|
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
2022-01-17 15:58:27 +01:00
|
|
|
auto gyroL3gHandler =
|
2022-05-26 11:46:28 +02:00
|
|
|
new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
|
2022-01-17 15:58:27 +01:00
|
|
|
gyroL3gHandler->setStartUpImmediately();
|
2022-05-03 17:36:15 +02:00
|
|
|
#if OBSW_TEST_ACS == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
gyroL3gHandler->setToGoToNormalMode(true);
|
2021-09-22 15:43:11 +02:00
|
|
|
#endif
|
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
spiCookie =
|
2022-05-26 11:46:28 +02:00
|
|
|
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
|
|
|
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
|
|
|
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_MAIN_COM_IF,
|
2022-03-26 16:38:42 +01:00
|
|
|
spiCookie, ADIS1650X::Type::ADIS16505);
|
2022-01-17 15:58:27 +01:00
|
|
|
adisHandler->setStartUpImmediately();
|
|
|
|
|
2022-05-26 11:46:28 +02:00
|
|
|
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
|
|
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
2022-01-17 15:58:27 +01:00
|
|
|
gyroL3gHandler =
|
2022-05-26 11:46:28 +02:00
|
|
|
new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
|
2022-01-17 15:58:27 +01:00
|
|
|
gyroL3gHandler->setStartUpImmediately();
|
2022-05-03 17:36:15 +02:00
|
|
|
#if OBSW_TEST_ACS == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
gyroL3gHandler->setToGoToNormalMode(true);
|
2021-09-22 15:43:11 +02:00
|
|
|
#endif
|
2021-09-22 14:04:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ObjectFactory::createTestTasks() {
|
2022-01-17 15:58:27 +01:00
|
|
|
new TestTask(objects::TEST_TASK);
|
2021-09-22 14:04:39 +02:00
|
|
|
|
2022-02-22 13:50:46 +01:00
|
|
|
#if OBSW_ADD_SPI_TEST_CODE == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
new SpiTestClass(objects::SPI_TEST, gpioIF);
|
2021-09-22 14:04:39 +02:00
|
|
|
#endif
|
|
|
|
|
2022-02-22 13:50:46 +01:00
|
|
|
#if OBSW_ADD_UART_TEST_CODE == 1
|
2022-09-27 18:54:48 +02:00
|
|
|
new UartTestClass(objects::UART_TEST);
|
2021-09-22 14:04:39 +02:00
|
|
|
#else
|
2022-01-17 15:58:27 +01:00
|
|
|
new UartComIF(objects::UART_COM_IF);
|
2021-09-22 14:04:39 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if RPI_LOOPBACK_TEST_GPIO == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
GpioCookie* gpioCookieLoopback = new GpioCookie();
|
|
|
|
/* Loopback pins. Adapt according to setup */
|
|
|
|
gpioId_t gpioIdSender = gpioIds::TEST_ID_0;
|
|
|
|
int bcmPinSender = 26;
|
|
|
|
gpioId_t gpioIdReader = gpioIds::TEST_ID_1;
|
|
|
|
int bcmPinReader = 16;
|
|
|
|
gpio::createRpiGpioConfig(gpioCookieLoopback, gpioIdSender, bcmPinSender, "GPIO_LB_SENDER",
|
|
|
|
gpio::Direction::OUT, 0);
|
|
|
|
gpio::createRpiGpioConfig(gpioCookieLoopback, gpioIdReader, bcmPinReader, "GPIO_LB_READER",
|
|
|
|
gpio::Direction::IN, 0);
|
|
|
|
new LibgpiodTest(objects::LIBGPIOD_TEST, objects::GPIO_IF, gpioCookieLoopback);
|
2021-09-22 14:04:39 +02:00
|
|
|
#endif /* RPI_LOOPBACK_TEST_GPIO == 1 */
|
|
|
|
|
2021-05-24 01:20:44 +02:00
|
|
|
#if RPI_TEST_ADIS16507 == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
if (gpioCookie == nullptr) {
|
|
|
|
gpioCookie = new GpioCookie();
|
|
|
|
}
|
|
|
|
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
|
|
|
|
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
|
|
|
|
gpioIF->addGpios(gpioCookie);
|
|
|
|
|
|
|
|
spiDev = "/dev/spidev0.1";
|
|
|
|
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
|
|
|
|
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
|
|
|
|
spi::DEFAULT_ADIS16507_SPEED, nullptr, nullptr);
|
|
|
|
auto adisGyroHandler =
|
|
|
|
new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF, spiCookie);
|
|
|
|
adisGyroHandler->setStartUpImmediately();
|
2021-05-24 01:20:44 +02:00
|
|
|
#endif /* RPI_TEST_ADIS16507 == 1 */
|
2021-06-24 08:50:46 +02:00
|
|
|
|
|
|
|
#if RPI_TEST_GPS_HANDLER == 1
|
2022-01-17 15:58:27 +01:00
|
|
|
UartCookie* uartCookie =
|
|
|
|
new UartCookie(objects::GPS0_HANDLER, "/dev/serial0", UartModes::CANONICAL, 9600, 1024);
|
|
|
|
uartCookie->setToFlushInput(true);
|
|
|
|
uartCookie->setReadCycles(6);
|
|
|
|
GPSHyperionHandler* gpsHandler =
|
|
|
|
new GPSHyperionHandler(objects::GPS0_HANDLER, objects::UART_COM_IF, uartCookie, false);
|
|
|
|
gpsHandler->setStartUpImmediately();
|
2021-06-24 08:50:46 +02:00
|
|
|
#endif
|
2020-09-30 17:17:01 +02:00
|
|
|
}
|