From 171adbe7db8520f5ff52a5fe2c54fe165c6f91f8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 11 Jun 2017 16:11:09 -0700 Subject: altoslib, altosuilib, altosui, telegps: Missing config values now MISSING Config values that didn't apply to the current product used to get set to -1, but now they're set to AltosLib.MISSING to be consistent with the rest of the code. Deal with this in the UI bits. Signed-off-by: Keith Packard --- altosui/AltosIgniteUI.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'altosui/AltosIgniteUI.java') diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 15493b8a..fe6194ef 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -213,6 +213,8 @@ public class AltosIgniteUI fired(); } else if (reply.startsWith("npyro")) { npyro = Integer.parseInt(reply.substring(6)); + if (npyro == AltosLib.MISSING) + npyro = 0; make_ui(); } } @@ -255,15 +257,11 @@ public class AltosIgniteUI boolean getting_status = false; - boolean visible = false; - void set_ignite_status() { getting_status = false; poll_remaining = 2; - if (!visible) { - visible = true; + if (!isVisible()) setVisible(true); - } } void poll_ignite_status() { -- cgit v1.2.3