altos: Re-enable apogee delay
authorKeith Packard <keithp@keithp.com>
Thu, 17 Feb 2022 01:00:59 +0000 (17:00 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 17 Feb 2022 01:26:10 +0000 (17:26 -0800)
When the igniter code was changed to support booster mode, the code
which delayed apogee firing based on the configure apogee delay value
was lost. Re-enable that by sticking a delay before firing the drogue
charge when the ignite mode is not redundant apogee.

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

index d197239a991e60db1ce9d90b38b8611335e4b184..86a116d1f11addecf6d6d0d0009420df19e34266 100644 (file)
@@ -82,6 +82,9 @@ ao_igniter_fire(enum ao_igniter igniter, bool wait)
                ao_ignition[igniter].fired = 1;
                switch (igniter) {
                case ao_igniter_drogue:
+                       if (wait && ao_config.apogee_delay &&
+                           ao_config.ignite_mode != AO_IGNITE_MODE_MAIN)
+                               ao_delay(AO_SEC_TO_TICKS(ao_config.apogee_delay));
                        AO_IGNITER_SET_DROGUE(1);
                        ao_delay(AO_IGNITER_FIRE_TIME);
                        AO_IGNITER_SET_DROGUE(0);