altos: Change 'after motor' pyro check to be >= instead of ==
authorKeith Packard <keithp@keithp.com>
Sun, 5 Aug 2018 00:44:04 +0000 (08:44 +0800)
committerKeith Packard <keithp@keithp.com>
Sun, 5 Aug 2018 01:04:19 +0000 (09:04 +0800)
This makes after motor stay valid even if further motors burn.

Signed-off-by: Keith Packard <keithp@keithp.com>
doc/pyro-channels.inc
src/kernel/ao_pyro.c

index 7fd0641245947739811ccd2e6b547d459bdea011..68bbf9103d8d66119a79e9cbdbce98c47d41a83f 100644 (file)
@@ -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
 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,
 
 Delay:: Once the other parameters all become true, a timer is
 started for the specified amount of time. While the timer is running,
index 5a556d594c75b5b8947d49757d68deb3a58bab5c..3c872354ba5fa7ccb1b7c7dca29be32cb40fc23d 100644 (file)
@@ -182,7 +182,7 @@ ao_pyro_ready(struct ao_pyro *pyro)
                        break;
 
                case ao_pyro_after_motor:
                        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;
                                continue;
                        DBG("motor %d != %d\n", ao_motor_number, pyro->motor);
                        break;