*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
-import org.altusmetrum.altoslib_8.*;
-import org.altusmetrum.altosuilib_8.*;
+import org.altusmetrum.altoslib_14.*;
+import org.altusmetrum.altosuilib_14.*;
public class AltosIgniteUI
extends AltosUIDialog
int time_remaining;
boolean timer_running;
+ int poll_remaining;
+
LinkedBlockingQueue<String> command_queue;
class Igniter {
fired();
} else if (reply.startsWith("npyro")) {
npyro = Integer.parseInt(reply.substring(6));
+ if (npyro == AltosLib.MISSING)
+ npyro = 0;
make_ui();
}
}
boolean getting_status = false;
- boolean visible = false;
-
void set_ignite_status() {
getting_status = false;
- if (!visible) {
- visible = true;
+ poll_remaining = 2;
+ if (!isVisible())
setVisible(true);
- }
}
void poll_ignite_status() {
+ if (poll_remaining > 0) {
+ --poll_remaining;
+ return;
+ }
if (!getting_status) {
getting_status = true;
send_command("get_status");