diff options
author | Keith Packard <keithp@keithp.com> | 2011-03-28 17:54:44 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-03-28 17:54:44 -0700 |
commit | c754759a2d503633d527da4ebb20eb859cd506fd (patch) | |
tree | 75384610b018a5ae52ce4462a4109b5b344c7192 /src/ao_config.c | |
parent | 006de838bbb096b9443863a46b8a125b1e6b5600 (diff) |
altos: Split up flight code into separate flight/sample/kalman bits
The flight code mashed together data processing, filtering and actual
flight managament into one giant pile. Split things up so that we
have:
ao_sample.c: Sensor data processing. Reads the ring, handles calibration
ao_kalman.c: Filter the data to track the accel/speed/height values
ao_flight.c: Flight state management, specific to rocketry.
The plan is to re-use ao_sample.c and ao_kalman.c for hardware not
specifically designed for rocketry, like TeleNano.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_config.c')
-rw-r--r-- | src/ao_config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ao_config.c b/src/ao_config.c index 771b21a1..319febb9 100644 --- a/src/ao_config.c +++ b/src/ao_config.c @@ -215,10 +215,10 @@ ao_config_accel_calibrate_auto(char *orientation) __reentrant puts("Calibrating..."); flush(); i = ACCEL_CALIBRATE_SAMPLES; accel_total = 0; - cal_adc_ring = ao_flight_adc; + cal_adc_ring = ao_sample_adc; while (i) { - ao_sleep(DATA_TO_XDATA(&ao_flight_adc)); - while (i && cal_adc_ring != ao_flight_adc) { + ao_sleep(DATA_TO_XDATA(&ao_sample_adc)); + while (i && cal_adc_ring != ao_sample_adc) { accel_total += (int32_t) ao_adc_ring[cal_adc_ring].accel; cal_adc_ring = ao_adc_ring_next(cal_adc_ring); i--; |