projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: teleterra mockup - fix speed values
[fw/altos]
/
altosui
/
AltosTerra.java
diff --git
a/altosui/AltosTerra.java
b/altosui/AltosTerra.java
index 20ad137f62e5d19c017ac7d6db92be0a1e4df615..bf48bee74ea8a35c2cd5c98085ade4370a089831 100644
(file)
--- a/
altosui/AltosTerra.java
+++ b/
altosui/AltosTerra.java
@@
-116,6
+116,10
@@
public class AltosTerra
}
public void display() {
}
public void display() {
+ double speed = current_state.speed;
+ if (!current_state.ascent)
+ speed = current_state.baro_speed;
+
switch (displayed_tab) {
default:
case info_tab:
switch (displayed_tab) {
default:
case info_tab:
@@
-140,7
+144,7
@@
public class AltosTerra
break;
case ascent_tab:
setLine(0, "S:%5d S⌈%5d%c",
break;
case ascent_tab:
setLine(0, "S:%5d S⌈%5d%c",
- (int) Math.floor(
current_state.
speed + 0.5),
+ (int) Math.floor(speed + 0.5),
(int) Math.floor(current_state.max_speed + 0.5),
state_char(current_state));
setLine(1, "H:%5d H⌈%5d",
(int) Math.floor(current_state.max_speed + 0.5),
state_char(current_state));
setLine(1, "H:%5d H⌈%5d",
@@
-154,7
+158,7
@@
public class AltosTerra
state_char(current_state));
setLine(1, "H%5d S%5d",
(int) Math.floor(current_state.height + 0.5),
state_char(current_state));
setLine(1, "H%5d S%5d",
(int) Math.floor(current_state.height + 0.5),
- (int) Math.floor(
current_state.baro_
speed + 0.5));
+ (int) Math.floor(speed + 0.5));
break;
case landing_tab:
setLine(0, "%s%c", pos(current_state.gps.lat, "N", "S"),
break;
case landing_tab:
setLine(0, "%s%c", pos(current_state.gps.lat, "N", "S"),