|
Thomas Sailer |
3048e94 |
diff --git a/flightdeck/sensgpsd.cc b/flightdeck/sensgpsd.cc
|
|
Thomas Sailer |
3048e94 |
index e430df8c..b6d3d6ef 100644
|
|
Thomas Sailer |
3048e94 |
--- a/flightdeck/sensgpsd.cc
|
|
Thomas Sailer |
3048e94 |
+++ b/flightdeck/sensgpsd.cc
|
|
Thomas Sailer |
3048e94 |
@@ -114,16 +114,25 @@ bool Sensors::SensorGPSD::gps_poll(Glib::IOCondition iocond)
|
|
Thomas Sailer |
3048e94 |
|
|
Thomas Sailer |
3048e94 |
void Sensors::SensorGPSD::update_gps(void)
|
|
Thomas Sailer |
3048e94 |
{
|
|
Thomas Sailer |
3048e94 |
+#if GPSD_API_MAJOR_VERSION >= 10
|
|
Thomas Sailer |
3048e94 |
+ if (true)
|
|
Thomas Sailer |
3048e94 |
+ std::cerr << "GPS: set 0x" << std::hex << m_gpsdata.m_gpsdata.set << std::dec << " status " << m_gpsdata.m_gpsdata.fix.status
|
|
Thomas Sailer |
3048e94 |
+ << " fixmode " << m_gpsdata.m_gpsdata.fix.mode << std::endl;
|
|
Thomas Sailer |
3048e94 |
+#else
|
|
Thomas Sailer |
3048e94 |
if (true)
|
|
Thomas Sailer |
3048e94 |
std::cerr << "GPS: set 0x" << std::hex << m_gpsdata.m_gpsdata.set << std::dec << " status " << m_gpsdata.m_gpsdata.status
|
|
Thomas Sailer |
3048e94 |
<< " fixmode " << m_gpsdata.m_gpsdata.fix.mode << std::endl;
|
|
Thomas Sailer |
3048e94 |
+#endif
|
|
Thomas Sailer |
3048e94 |
m_conntimeout.disconnect();
|
|
Thomas Sailer |
3048e94 |
m_conntimeout = Glib::signal_timeout().connect(sigc::mem_fun(*this, &SensorGPSD::gps_timeout), 5000);
|
|
Thomas Sailer |
3048e94 |
ParamChanged pc;
|
|
Thomas Sailer |
3048e94 |
if (m_gpsdata.m_gpsdata.set & MODE_SET) {
|
|
Thomas Sailer |
3048e94 |
fixtype_t oldfixtype(m_fixtype);
|
|
Thomas Sailer |
3048e94 |
- if ((m_gpsdata.m_gpsdata.set & STATUS_SET) &&
|
|
Thomas Sailer |
3048e94 |
- m_gpsdata.m_gpsdata.status == STATUS_NO_FIX) {
|
|
Thomas Sailer |
3048e94 |
+#if GPSD_API_MAJOR_VERSION >= 10
|
|
Thomas Sailer |
3048e94 |
+ if ((m_gpsdata.m_gpsdata.set & STATUS_SET) && m_gpsdata.m_gpsdata.fix.status == STATUS_NO_FIX) {
|
|
Thomas Sailer |
3048e94 |
+#else
|
|
Thomas Sailer |
3048e94 |
+ if ((m_gpsdata.m_gpsdata.set & STATUS_SET) && m_gpsdata.m_gpsdata.status == STATUS_NO_FIX) {
|
|
Thomas Sailer |
3048e94 |
+#endif
|
|
Thomas Sailer |
3048e94 |
m_fixtype = fixtype_nofix;
|
|
Thomas Sailer |
3048e94 |
} else {
|
|
Thomas Sailer |
3048e94 |
switch (m_gpsdata.m_gpsdata.fix.mode) {
|
|
Thomas Sailer |
3048e94 |
diff --git a/src/Navigate.cc b/src/Navigate.cc
|
|
Thomas Sailer |
3048e94 |
index bd1cead6..3c7e321e 100644
|
|
Thomas Sailer |
3048e94 |
--- a/src/Navigate.cc
|
|
Thomas Sailer |
3048e94 |
+++ b/src/Navigate.cc
|
|
Thomas Sailer |
3048e94 |
@@ -1063,7 +1063,11 @@ bool Navigate::GPSCommGPSD::gps_poll(Glib::IOCondition iocond)
|
|
Thomas Sailer |
3048e94 |
#else
|
|
Thomas Sailer |
3048e94 |
::gps_poll(m_gpsdata);
|
|
Thomas Sailer |
3048e94 |
#endif
|
|
Thomas Sailer |
3048e94 |
+#if GPSD_API_MAJOR_VERSION >= 10
|
|
Thomas Sailer |
3048e94 |
+ std::cerr << "status " << m_gpsdata.fix.status << " fixtype " << m_gpsdata.fix.mode << std::endl;
|
|
Thomas Sailer |
3048e94 |
+#else
|
|
Thomas Sailer |
3048e94 |
std::cerr << "status " << m_gpsdata.status << " fixtype " << m_gpsdata.fix.mode << std::endl;
|
|
Thomas Sailer |
3048e94 |
+#endif
|
|
Thomas Sailer |
3048e94 |
return true;
|
|
Thomas Sailer |
3048e94 |
}
|
|
Thomas Sailer |
3048e94 |
|
|
Thomas Sailer |
9288c9d |
@@ -1096,7 +1096,11 @@ Navigate::GPSCommGPSD::fixtype_t Navigate::GPSCommGPSD::get_fixtype(void) const
|
|
Thomas Sailer |
9288c9d |
|
|
Thomas Sailer |
9288c9d |
Navigate::GPSCommGPSD::fixstatus_t Navigate::GPSCommGPSD::get_fixstatus(void) const
|
|
Thomas Sailer |
9288c9d |
{
|
|
Thomas Sailer |
9288c9d |
+#if GPSD_API_MAJOR_VERSION >= 10
|
|
Thomas Sailer |
9288c9d |
+ switch (m_gpsdata.fix.status) {
|
|
Thomas Sailer |
9288c9d |
+#else
|
|
Thomas Sailer |
9288c9d |
switch (m_gpsdata.status) {
|
|
Thomas Sailer |
9288c9d |
+#endif
|
|
Thomas Sailer |
9288c9d |
default:
|
|
Thomas Sailer |
9288c9d |
case STATUS_NO_FIX:
|
|
Thomas Sailer |
9288c9d |
return fixstatus_nofix;
|