import java.util.prefs.*;
import java.util.concurrent.LinkedBlockingQueue;
-import altosui.AltosRecord;
-import altosui.AltosState;
-import altosui.AltosDeviceDialog;
-import altosui.AltosPreferences;
-import altosui.AltosLog;
-import altosui.AltosVoice;
-import altosui.AltosEepromMonitor;
-
/*
* AltosRecords with an index field so they can be sorted by tick while preserving
* the original ordering for elements with matching ticks
int flags = (good.b >> 8);
int seconds = hour * 3600 + minute * 60 + second;
+ /* Make sure this looks like a good GPS value */
+ if ((flags & Altos.AO_GPS_NUM_SAT_MASK) >> Altos.AO_GPS_NUM_SAT_SHIFT < 4)
+ flags = (flags & ~Altos.AO_GPS_NUM_SAT_MASK) | (4 << Altos.AO_GPS_NUM_SAT_SHIFT);
+ flags |= Altos.AO_GPS_RUNNING;
+ flags |= Altos.AO_GPS_VALID;
+
int new_seconds = seconds + diff;
if (new_seconds < 0)
new_seconds += 24 * 3600;