X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosIgniteUI.java;h=15493b8a373c08c15cbbe0febf3c2234692a0776;hp=14a2b606cb2651a4db4036645ef857c587f3b569;hb=2e82051a6aaaccf1e8a242f9c8141e4167e652d2;hpb=d6445b3739ac2c5dd040efdb97317a6b2a48044a diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 14a2b606..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_8.*; -import org.altusmetrum.altosuilib_8.*; +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");