altos: Flush pyro updates during fake flight
authorKeith Packard <keithp@keithp.com>
Mon, 18 Sep 2017 16:54:27 +0000 (09:54 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 18 Sep 2017 16:59:44 +0000 (09:59 -0700)
Let them appear at the right time.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_fake_flight.c

index 5880cf2b607eeb335edb19ed7b467cc230770dd1..8b2ecef070f38f5d149e98d8c37851ad37699499 100644 (file)
@@ -180,8 +180,10 @@ ao_fake_flight(void)
 
                        for (pyro = 0; pyro < AO_PYRO_NUM; pyro++) {
                                uint16_t        bit = (1 << pyro);
-                               if (!(my_pyro_fired & bit) && (ao_pyro_fired & bit))
+                               if (!(my_pyro_fired & bit) && (ao_pyro_fired & bit)) {
                                        printf ("fire %d\n", pyro);
+                                       flush();
+                               }
                        }
                        my_pyro_fired = ao_pyro_fired;
                }