[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gpsd-dev
Subject:    [gpsd-dev] [PATCH 1/6] Add missing attitude field initialisation in NMEA TNTHTM
From:       chris () techworks ! ie
Date:       2012-04-21 9:34:17
Message-ID: 1335000862-15312-2-git-send-email-chris () techworks ! ie
[Download RAW message or body]

From: Christian Gagneraud <chgans@gna.org>

Depth and Temperature are not initialised, causing the JSON output to
report a zero value instead of not reporting them at all
---
 driver_nmea0183.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index e66c4c3..c269180 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -915,6 +915,8 @@ static gps_mask_t processTNTHTM(int c UNUSED, char *field[],
     session->gpsdata.attitude.acc_z = NAN;
     session->gpsdata.attitude.gyro_x = NAN;
     session->gpsdata.attitude.gyro_y = NAN;
+    session->gpsdata.attitude.temp = NAN;
+    session->gpsdata.attitude.depth = NAN;
     mask |= (ATTITUDE_SET);
 
     gpsd_report(LOG_RAW, "time %.3f, heading %lf (%c).\n",
-- 
1.7.0.4


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic