altoslib: Flush igniter fire command
authorKeith Packard <keithp@keithp.com>
Mon, 12 Jun 2017 05:50:28 +0000 (22:50 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 12 Jun 2017 05:54:23 +0000 (22:54 -0700)
This makes the igniter fire without a multi-second delay.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosIgnite.java

index cdc5c61..5df64ab 100644 (file)
@@ -102,7 +102,7 @@ public class AltosIgnite {
        private void get_npyro() throws InterruptedException, TimeoutException {
                if (config_data == null)
                        config_data = new AltosConfigData(link);
-               if (config_data != null)
+               if (config_data != null && config_data.npyro != AltosLib.MISSING)
                        npyro = config_data.npyro;
                else
                        npyro = 0;
@@ -174,6 +174,7 @@ public class AltosIgnite {
                try {
                        start_link();
                        link.printf("i DoIt %s\n", igniter);
+                       link.flush_output();
                } catch (TimeoutException te) {
                } finally {
                        stop_link();