From: Keith Packard Date: Sat, 14 Jun 2014 21:36:49 +0000 (-0700) Subject: altosuilib: In graph, show zero sats in view as 0 instead of MISSING X-Git-Tag: 1.4~33 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=242e968a6982f2ceaa79780cbeec8c4e21321b44;hp=c7553c54765dcc9ac532fe52aae9594b2ad5e560 altosuilib: In graph, show zero sats in view as 0 instead of MISSING Signed-off-by: Keith Packard --- diff --git a/altosuilib/AltosGraphDataPoint.java b/altosuilib/AltosGraphDataPoint.java index 446468d7..3aff1e82 100644 --- a/altosuilib/AltosGraphDataPoint.java +++ b/altosuilib/AltosGraphDataPoint.java @@ -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();