altosuilib: In graph, show zero sats in view as 0 instead of MISSING
authorKeith Packard <keithp@keithp.com>
Sat, 14 Jun 2014 21:36:49 +0000 (14:36 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 14 Jun 2014 21:36:49 +0000 (14:36 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosGraphDataPoint.java

index 446468d752994b4f61a9ba978ee739c346661ade..3aff1e826b488d7e83306ed628fa0153ae193b7e 100644 (file)
@@ -101,8 +101,12 @@ public class AltosGraphDataPoint implements AltosUIDataPoint {
                                y = state.gps.nsat;
                        break;
                case data_gps_nsat_view:
-                       if (state.gps != null && state.gps.cc_gps_sat != null)
-                               y = state.gps.cc_gps_sat.length;
+                       if (state.gps != null) {
+                               if (state.gps.cc_gps_sat != null)
+                                       y = state.gps.cc_gps_sat.length;
+                               else
+                                       y = 0;
+                       }
                        break;
                case data_gps_altitude:
                        y = state.gps_altitude();