From 327b765962d397efd4c45b6209c9225a4d23ba1d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 5 Aug 2018 08:44:04 +0800 Subject: [PATCH] altos: Change 'after motor' pyro check to be >= instead of == This makes after motor stay valid even if further motors burn. Signed-off-by: Keith Packard --- doc/pyro-channels.inc | 4 +++- src/kernel/ao_pyro.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/pyro-channels.inc b/doc/pyro-channels.inc index 7fd06412..68bbf910 100644 --- a/doc/pyro-channels.inc +++ b/doc/pyro-channels.inc @@ -57,7 +57,9 @@ cleared and must be reconfigured by the user. After Motor:: The flight software counts each time the rocket starts accelerating and then decelerating (presumably due to a motor or motors burning). Use this value for multi-staged or multi-airstart -launches. +launches. As of version 1.8.6 firmware, this checks to make sure at +least this many motors have burned. Before version 1.8.6, this checked +to make sure that exactly this many motors had burned. Delay:: Once the other parameters all become true, a timer is started for the specified amount of time. While the timer is running, diff --git a/src/kernel/ao_pyro.c b/src/kernel/ao_pyro.c index 5a556d59..3c872354 100644 --- a/src/kernel/ao_pyro.c +++ b/src/kernel/ao_pyro.c @@ -182,7 +182,7 @@ ao_pyro_ready(struct ao_pyro *pyro) break; case ao_pyro_after_motor: - if (ao_motor_number == pyro->motor) + if (ao_motor_number >= pyro->motor) continue; DBG("motor %d != %d\n", ao_motor_number, pyro->motor); break; -- 2.30.2