pud: make sure to actually count inUse satellites (on older gpsd)
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 1 Aug 2016 10:27:52 +0000 (12:27 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 1 Aug 2016 12:31:04 +0000 (14:31 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/gpsdclient.c

index 334c23f..875482b 100644 (file)
@@ -521,6 +521,9 @@ void nmeaInfoFromGpsd(struct gps_data_t *gpsdata, NmeaInfo *info, struct GpsdCon
 #ifndef GPSD_NEW
       int prn = gpsdata->used[iGpsd];
       info->satellites.inUse[iInUse++] = (prn < 0) ? 0 : (unsigned int) prn;
+      if (prn > 0) {
+        info->satellites.inUseCount++;
+      }
 
       prn = gpsdata->PRN[iGpsd];
       if (prn > 0) {