From 9bd3f6c9bff4253dadd32c4722ad9318e8731f63 Mon Sep 17 00:00:00 2001 From: Hidenori Date: Sat, 3 Sep 2016 17:06:40 -0400 Subject: [PATCH] Navio: Delete (wrong) unnecessary ifdef and modify for new GPSDriverUBX constructor --- src/drivers/gps/gps.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index a83f3bdd27..d8a0bb5c53 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -374,7 +374,7 @@ int GPS::pollOrRead(uint8_t *buf, size_t buf_length, int timeout) { handleInjectDataTopic(); -#if !defined(__PX4_QURT) || !defined(__PX4_POSIX_RPI) +#if !defined(__PX4_QURT) /* For non QURT, use the usual polling. */ @@ -701,7 +701,11 @@ GPS::task_main() switch (_mode) { case GPS_DRIVER_MODE_UBX: - _helper = new GPSDriverUBX(&GPS::callback, this, &_report_gps_pos, _p_report_sat_info); +#ifndef __PX4_POSIX_RPI + _helper = new GPSDriverUBX(GPSHelper::Interface::UART, &GPS::callback, this, &_report_gps_pos, _p_report_sat_info); +#else + _helper = new GPSDriverUBX(GPSHelper::Interface::SPI, &GPS::callback, this, &_report_gps_pos, _p_report_sat_info); +#endif break; case GPS_DRIVER_MODE_MTK: