X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosIgniteUI.java;h=15493b8a373c08c15cbbe0febf3c2234692a0776;hb=08da6f2100c0241c70554427e53b7e237dfda16c;hp=01d58b5eda1e17c6425fc581d7449ac5701ab989;hpb=7041c386cdf37716f8daf0bc1a9204db620e3de9;p=fw%2Faltos diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 01d58b5e..15493b8a 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -3,7 +3,8 @@ * * 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 @@ -24,8 +25,8 @@ import java.io.*; import java.text.*; import java.util.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_9.*; -import org.altusmetrum.altosuilib_9.*; +import org.altusmetrum.altoslib_11.*; +import org.altusmetrum.altosuilib_11.*; public class AltosIgniteUI extends AltosUIDialog @@ -48,6 +49,8 @@ public class AltosIgniteUI int time_remaining; boolean timer_running; + int poll_remaining; + LinkedBlockingQueue command_queue; class Igniter { @@ -256,6 +259,7 @@ public class AltosIgniteUI void set_ignite_status() { getting_status = false; + poll_remaining = 2; if (!visible) { visible = true; setVisible(true); @@ -263,6 +267,10 @@ public class AltosIgniteUI } void poll_ignite_status() { + if (poll_remaining > 0) { + --poll_remaining; + return; + } if (!getting_status) { getting_status = true; send_command("get_status");