added GNSS select pin
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-02-01 11:17:00 +01:00
parent 3bd4c57b85
commit 4050521e5a
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 10 additions and 1 deletions

View File

@ -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";

View File

@ -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 */
}

View File

@ -29,6 +29,7 @@ enum gpioId_t {
GNSS_1_NRESET,
GNSS_0_ENABLE,
GNSS_1_ENABLE,
GNSS_SELECT,
GYRO_0_ENABLE,
GYRO_2_ENABLE,