From bb58281fba4c58fe733fe480861e535ad761a48c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 20 Aug 2021 18:48:05 +0200 Subject: [PATCH] minor fix for gps --- bsp_q7s/core/ObjectFactory.cpp | 28 ++++++++------- .../pollingSequenceFactory.cpp | 34 ++++++++++++------- 2 files changed, 37 insertions(+), 25 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index ef94e9d5..a22f219e 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -274,43 +274,43 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, GpioCallback* susgpio = nullptr; susgpio = new GpioCallback("Chip select SUS 1", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_1, susgpio); susgpio = new GpioCallback("Chip select SUS 2", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_2, susgpio); susgpio = new GpioCallback("Chip select SUS 3", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_3, susgpio); susgpio = new GpioCallback("Chip select SUS 4", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_4, susgpio); susgpio = new GpioCallback("Chip select SUS 5", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_5, susgpio); susgpio = new GpioCallback("Chip select SUS 6", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_6, susgpio); susgpio = new GpioCallback("Chip select SUS 7", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_7, susgpio); susgpio = new GpioCallback("Chip select SUS 8", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_8, susgpio); susgpio = new GpioCallback("Chip select SUS 9", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_9, susgpio); susgpio = new GpioCallback("Chip select SUS 10", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_10, susgpio); susgpio = new GpioCallback("Chip select SUS 11", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_11, susgpio); susgpio = new GpioCallback("Chip select SUS 12", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_12, susgpio); susgpio = new GpioCallback("Chip select SUS 13", gpio::OUT, 1, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_13, susgpio); gpioComIF->addGpios(gpioCookieSus); @@ -471,6 +471,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI auto uartCookieGps0 = new UartCookie(objects::GPS0_HANDLER, q7s::UART_GNSS_0_DEV, UartModes::CANONICAL, 9600, uart::HYPERION_GPS_REPLY_MAX_BUFFER); + uartCookieGps0->setToFlushInput(true); + uartCookieGps0->setReadCycles(6); auto uartCookieGps1 = new UartCookie(objects::GPS1_HANDLER, q7s::UART_GNSS_1_DEV, UartModes::CANONICAL, 9600, uart::HYPERION_GPS_REPLY_MAX_BUFFER); uartCookieGps1->setToFlushInput(true); diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index d3593da6..045a7af3 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -469,16 +469,16 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { // thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.8, // DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, - DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.2, - DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.4, - DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6, - DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.8, - DeviceHandlerIF::GET_READ); +// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, +// DeviceHandlerIF::PERFORM_OPERATION); +// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.2, +// DeviceHandlerIF::SEND_WRITE); +// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.4, +// DeviceHandlerIF::GET_WRITE); +// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6, +// DeviceHandlerIF::SEND_READ); +// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.8, +// DeviceHandlerIF::GET_READ); // thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, // DeviceHandlerIF::PERFORM_OPERATION); @@ -490,8 +490,18 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { // DeviceHandlerIF::SEND_READ); // thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8, // DeviceHandlerIF::GET_READ); -// -// + + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.2, + DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.4, + DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.6, + DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.8, + DeviceHandlerIF::GET_READ); + // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, // DeviceHandlerIF::PERFORM_OPERATION); // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.2,