summaryrefslogtreecommitdiff
path: root/altoslib/AltosMap.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2019-09-02 15:20:14 -0500
committerKeith Packard <keithp@keithp.com>2019-09-02 15:45:30 -0500
commit2524730217e6972f3d0f04a9954350ba1964a83a (patch)
tree959e388b0ea4908cb9cd21b60c662f2cedcb9bfb /altoslib/AltosMap.java
parentb13893245e8c66b48e23bb2005ef6ce46e69744f (diff)
altosui: Add speed and gps height to map display data
And generalize the API so that any other GPS data could be added in the future. This feature was proposed by Mike Beattie Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosMap.java')
-rw-r--r--altoslib/AltosMap.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/altoslib/AltosMap.java b/altoslib/AltosMap.java
index b9c4bfc1..69142c37 100644
--- a/altoslib/AltosMap.java
+++ b/altoslib/AltosMap.java
@@ -222,8 +222,7 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener {
return false;
}
- public void show(AltosGPS gps, double time, int state) {
-
+ public void show(AltosGPS gps, double time, int state, double gps_height) {
/*
* If insufficient gps data, nothing to update
*/
@@ -250,7 +249,7 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener {
}
if (path != null) {
- AltosMapRectangle damage = path.add(gps.lat, gps.lon, time, state);
+ AltosMapRectangle damage = path.add(gps, time, state, gps_height);
if (damage != null)
repaint(damage, AltosMapPath.stroke_width);
@@ -262,7 +261,7 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener {
}
public void show(AltosState state, AltosListenerState listener_state) {
- show(state.gps, state.time, state.state());
+ show(state.gps, state.time, state.state(), state.gps_height());
}
public void centre(AltosLatLon lat_lon) {