From: Keith Packard Date: Sat, 15 Jan 2011 20:02:43 +0000 (-0800) Subject: altosui: Require 4 sats to light up the 'GPS locked' light. X-Git-Tag: debian/0.8.1+71+gda42f40~13 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=d0a841b285fb398f0be72183ec3c9d1e358419a9 altosui: Require 4 sats to light up the 'GPS locked' light. This tracks the same GPS signal requirement needed for 'GPS ready' and ensures that we have a 3d fix. Signed-off-by: Keith Packard --- diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index 66954347..e345e5da 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -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");