summaryrefslogtreecommitdiff
path: root/altosui/AltosSiteMap.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-04-09 00:28:05 -0700
committerKeith Packard <keithp@keithp.com>2013-04-09 00:30:36 -0700
commit398c02b945a58634c8932f07df2c2be8438da7d1 (patch)
tree2741e99555d58e9509271da719d039516e16819f /altosui/AltosSiteMap.java
parent08eb1e3e1abb1aa4f5ea92b781a2ff8f480006c5 (diff)
altoslib/altosui: Carry receiver status around in AltosListenerState
This moves the crc_errors into the new structure and adds a receiver battery voltage value there as well. Now the receiver status can be monitored separately from the flight status. That also means that code receiving state updates should be prepared to accept missing listener or flight state values. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosSiteMap.java')
-rw-r--r--altosui/AltosSiteMap.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java
index f614eae6..5bf02e54 100644
--- a/altosui/AltosSiteMap.java
+++ b/altosui/AltosSiteMap.java
@@ -264,7 +264,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
initMaps(lat, lon);
scrollRocketToVisible(pt(lat, lon));
}
- public void show(final AltosState state, final int crc_errors) {
+ public void show(final AltosState state, final AltosListenerState listener_state) {
// if insufficient gps data, nothing to update
if (!state.gps.locked && state.gps.nsat < 4)
return;
@@ -294,7 +294,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
Point2D.Double ref, lref;
ref = translatePoint(pt, tileCoordOffset(offset));
lref = translatePoint(last_pt, tileCoordOffset(offset));
- tile.show(state, crc_errors, lref, ref);
+ tile.show(state, listener_state, lref, ref);
if (0 <= ref.x && ref.x < px_size)
if (0 <= ref.y && ref.y < px_size)
in_any = true;
@@ -307,7 +307,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
lref = translatePoint(last_pt, tileCoordOffset(offset));
AltosSiteMapTile tile = createTile(offset);
- tile.show(state, crc_errors, lref, ref);
+ tile.show(state, listener_state, lref, ref);
initMap(offset);
finishTileLater(tile, offset);
}