diff options
author | Keith Packard <keithp@keithp.com> | 2012-07-14 01:26:38 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-07-14 01:26:38 -0700 |
commit | d90587535676f9492f0fde6b974353158104ef88 (patch) | |
tree | dd429fc66374376711dc6790b96f1ea09c640987 /src/core/ao_flight.c | |
parent | 09633cac697e37d770b2b666ab20cab30628484f (diff) |
altos: Add arbitrary pyro channel support
Programmed by specifying a conjunction of flight conditions that
trigger the igniter to fire.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_flight.c')
-rw-r--r-- | src/core/ao_flight.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index c6786455..fc018f00 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -40,6 +40,9 @@ __pdata enum ao_flight_state ao_flight_state; /* current flight state */ __pdata uint16_t ao_boost_tick; /* time of launch detect */ +#if AO_PYRO_NUM +__pdata uint16_t ao_motor_number; /* number of motors burned so far */ +#endif /* * track min/max data over a long interval to detect @@ -215,6 +218,9 @@ ao_flight(void) #else ao_flight_state = ao_flight_coast; #endif +#if AO_PYRO_NUM + ++ao_motor_number; +#endif ao_wakeup(DATA_TO_XDATA(&ao_flight_state)); } break; |