From a7dc77f0c6730f97e5dfbaefa70bfa3730caaeff Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Tue, 11 Sep 2018 18:15:59 -0700 Subject: ATT: centralize clearing of the attitude data. This showed up a bug where rtcm3_unpack() was not clearing its rtcm3 data, which is a union with the attitude data. --- libgps_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgps_core.c') diff --git a/libgps_core.c b/libgps_core.c index e02ff1b9..795a9018 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -111,8 +111,9 @@ int gps_open(const char *host, gpsdata->set = 0; gpsdata->status = STATUS_NO_FIX; gpsdata->satellites_used = 0; - gps_clear_fix(&(gpsdata->fix)); + gps_clear_att(&(gpsdata->attitude)); gps_clear_dop(&(gpsdata->dop)); + gps_clear_fix(&(gpsdata->fix)); return status; } -- cgit v1.2.1