From be117376179126824439d98379079025ca0b245a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 1 Aug 2011 17:06:49 -0700 Subject: [PATCH] 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 --- src/ao_launch.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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; } } -- 2.30.2