diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index ec7212bd..2083ac6b 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -43,6 +43,7 @@ static constexpr char GNSS_0_ENABLE[] = "enable_gnss_0"; static constexpr char GNSS_1_ENABLE[] = "enable_gnss_1"; static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0"; static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2"; +static constexpr char GNSS_SELECT[] = "gnss_mux_select"; static constexpr char HEATER_0[] = "heater0"; static constexpr char HEATER_1[] = "heater1"; static constexpr char HEATER_2[] = "heater2"; diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 67900284..980c57a2 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -482,6 +482,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI gpio::LOW); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_ENABLE, gpio); + // Select pin. 0 for GPS side A, 1 for GPS side B + consumer.str(""); + consumer << "0x" << std::hex << objects::GPS_CONTROLLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_SELECT, consumer.str(), gpio::DIR_OUT, + gpio::LOW); + gpioCookieAcsBoard->addGpio(gpioIds::GNSS_SELECT, gpio); gpioComIF->addGpios(gpioCookieAcsBoard); #if OBSW_ADD_ACS_HANDLERS == 1 @@ -579,7 +585,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI resetArgsGnss0.gnss1 = false; resetArgsGnss0.gpioComIF = gpioComIF; resetArgsGnss0.waitPeriodMs = 100; - auto gpsHandler0 = new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); + auto gpsHandler0 = + new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0); #endif /* OBSW_ADD_ACS_HANDLERS == 1 */ } diff --git a/linux/fsfwconfig/devices/gpioIds.h b/linux/fsfwconfig/devices/gpioIds.h index bb753a30..46717569 100644 --- a/linux/fsfwconfig/devices/gpioIds.h +++ b/linux/fsfwconfig/devices/gpioIds.h @@ -29,6 +29,7 @@ enum gpioId_t { GNSS_1_NRESET, GNSS_0_ENABLE, GNSS_1_ENABLE, + GNSS_SELECT, GYRO_0_ENABLE, GYRO_2_ENABLE,