summaryrefslogtreecommitdiff
path: root/altosui
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-10 11:32:57 -0700
committerKeith Packard <keithp@keithp.com>2014-06-10 11:32:57 -0700
commit90686853e46b7f0df9bdaf671f859819eef926e0 (patch)
tree8eddf81660f83bc55fd105dbffddb1dcd1921453 /altosui
parent7bdd0deabaae38ddfecd1ea2ea8deaf9af40b2ac (diff)
altosui: Show "Missing" instead of huge numbers in descent/landed tabs
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui')
-rw-r--r--altosui/AltosDescent.java10
-rw-r--r--altosui/AltosLanded.java5
2 files changed, 12 insertions, 3 deletions
diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java
index e6710524..b56a08bc 100644
--- a/altosui/AltosDescent.java
+++ b/altosui/AltosDescent.java
@@ -133,11 +133,17 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay {
void show(double v) {
this.v = v;
- show(units.show(8, v));
+ if (v == AltosLib.MISSING)
+ show("Missing");
+ else
+ show(units.show(8, v));
}
void show(String format, double v) {
- show(String.format(format, v));
+ if (v == AltosLib.MISSING)
+ show("Missing");
+ else
+ show(String.format(format, v));
}
public void font_size_changed(int font_size) {
diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java
index bb52fe2b..d2628fb0 100644
--- a/altosui/AltosLanded.java
+++ b/altosui/AltosLanded.java
@@ -51,7 +51,10 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
void show(double v) {
this.v = v;
- show(units.show(8, v));
+ if (v == AltosLib.MISSING)
+ show("Missing");
+ else
+ show(units.show(8, v));
}
void show(String format, double v) {