From 19db5401a07f28351c75ebfe3f478f1285d841fa Mon Sep 17 00:00:00 2001 From: Rodrigo Linfati Date: Wed, 26 Jan 2011 17:23:14 +0100 Subject: [PATCH] fix the NaN in gps --- src/gps.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gps.cpp b/src/gps.cpp index cd87f24..05fd97d 100644 --- a/src/gps.cpp +++ b/src/gps.cpp @@ -49,6 +49,8 @@ void GpsMaemo5::stop() { void GpsMaemo5::forcestop() { qDebug() << "GpsMaemo5: forcestop"; stopgps = true; + emitfix = false; + stop(); } int GpsMaemo5::config(int i, int w, bool g) { @@ -64,6 +66,7 @@ int GpsMaemo5::config(int i, int w, bool g) { void GpsMaemo5_changed(LocationGPSDevice *device, GpsMaemo5 *gps) { if (device->fix) { if (device->fix->fields) { + if ( isnan(gps->device->fix->eph) ) return; g_print("GpsMaemo5 lat %f lon %f eph %f\n", gps->device->fix->latitude, gps->device->fix->longitude, gps->device->fix->eph/100.); gps->latitude = gps->device->fix->latitude; gps->longitude = gps->device->fix->longitude; -- 1.7.9.5