From: Keith Packard Date: Tue, 2 Aug 2011 00:06:49 +0000 (-0700) Subject: altos: Keep relay closed while firing launcher X-Git-Tag: 1.0.9.1~38 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=be117376179126824439d98379079025ca0b245a altos: Keep relay closed while firing launcher Instead of opening the relay while checking the desired state, keep it closed until the state goes off. Signed-off-by: Keith Packard --- diff --git a/src/ao_launch.c b/src/ao_launch.c index 35afbda8..a593d0b2 100644 --- a/src/ao_launch.c +++ b/src/ao_launch.c @@ -31,17 +31,17 @@ ao_launch_run(void) for (;;) { while (!ao_launch_ignite) ao_sleep(&ao_launch_ignite); + ao_ignition[ao_igniter_drogue].firing = 1; + ao_ignition[ao_igniter_main].firing = 1; + AO_IGNITER_DIR |= AO_IGNITER_DROGUE_BIT | AO_IGNITER_MAIN_BIT; + AO_IGNITER_DROGUE = 1; while (ao_launch_ignite) { ao_launch_ignite = 0; - - ao_ignition[ao_igniter_drogue].firing = 1; - ao_ignition[ao_igniter_main].firing = 1; - AO_IGNITER_DROGUE = 1; ao_delay(AO_MS_TO_TICKS(500)); - AO_IGNITER_DROGUE = 0; - ao_ignition[ao_igniter_drogue].firing = 0; - ao_ignition[ao_igniter_main].firing = 0; } + AO_IGNITER_DROGUE = 0; + ao_ignition[ao_igniter_drogue].firing = 0; + ao_ignition[ao_igniter_main].firing = 0; } }