altosui: Require 4 sats to light up the 'GPS locked' light.
authorKeith Packard <keithp@keithp.com>
Sat, 15 Jan 2011 20:02:43 +0000 (12:02 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 16 Jan 2011 22:32:27 +0000 (14:32 -0800)
This tracks the same GPS signal requirement needed for 'GPS ready' and
ensures that we have a 3d fix.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosPad.java

index 669543472a71ff3074ad823f0e24c562dcc4220e..e345e5dafcdd8480ef0a36f1833fc60401bf002b 100644 (file)
@@ -152,7 +152,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay {
        class GPSLocked extends LaunchStatus {
                void show (AltosState state, int crc_errors) {
                        value.setText(String.format("%4d sats", state.gps.nsat));
-                       lights.set(state.gps.locked);
+                       lights.set(state.gps.locked && state.gps.nsat >= 4);
                }
                public GPSLocked (GridBagLayout layout, int y) {
                        super (layout, y, "GPS Locked");