This gives a remote like time to report the full status instead of
sending another request before the reply has been processed.
Signed-off-by: Keith Packard <keithp@keithp.com>
int time_remaining;
boolean timer_running;
+ int poll_remaining;
+
LinkedBlockingQueue<String> command_queue;
class Igniter {
void set_ignite_status() {
getting_status = false;
+ poll_remaining = 2;
if (!visible) {
visible = true;
setVisible(true);
}
void poll_ignite_status() {
+ if (poll_remaining > 0) {
+ --poll_remaining;
+ return;
+ }
if (!getting_status) {
getting_status = true;
send_command("get_status");