diff options
author | Keith Packard <keithp@keithp.com> | 2017-10-22 14:04:09 -0500 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-10-22 14:04:09 -0500 |
commit | 749400fd244eba38806c623d2a35722642230698 (patch) | |
tree | 39f95bc777544c6bd80f71ba824b81133edf6379 /altoslib/AltosEepromRecord.java | |
parent | e98235e314ac764509af26c93da9e6d1de8184ea (diff) |
altoslib: Move temp GPS API from cal_data to data_listener
This makes the API more consistent, and means that the listener is
responsible for mangaing the temp gps state. In particular, the
AltosDataListener set_gps API now calls the cal_data function.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosEepromRecord.java')
-rw-r--r-- | altoslib/AltosEepromRecord.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/altoslib/AltosEepromRecord.java b/altoslib/AltosEepromRecord.java index e937c3d0..12519e6b 100644 --- a/altoslib/AltosEepromRecord.java +++ b/altoslib/AltosEepromRecord.java @@ -90,11 +90,9 @@ public abstract class AltosEepromRecord implements Comparable<AltosEepromRecord> /* Flush any pending GPS changes */ if (!AltosLib.is_gps_cmd(cmd())) { - AltosGPS gps = cal_data.temp_gps(); - if (gps != null) { + AltosGPS gps = listener.temp_gps(); + if (gps != null) listener.set_gps(gps); - cal_data.reset_temp_gps(); - } } } |