diff options
author | Keith Packard <keithp@keithp.com> | 2011-01-16 15:57:15 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-01-16 20:24:13 -0800 |
commit | 1b8d7313504240ed04e0747e9b0f6e9a83d323e2 (patch) | |
tree | 35bbb21eaac8dcdca288aea68acc338500e7ba12 /src/ao_flight_test.c | |
parent | afd3d3cdb8c2291c1c7cda7908392d68cd04f87f (diff) |
altos: Auto-calibrate linux-based flight testing code
Use the provided ground acceleration average to set the two
accelerometer calibration values so that the flight code will
detect pad/idle mode correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_flight_test.c')
-rw-r--r-- | src/ao_flight_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ao_flight_test.c b/src/ao_flight_test.c index e0cfa47a..108d2c19 100644 --- a/src/ao_flight_test.c +++ b/src/ao_flight_test.c @@ -238,6 +238,8 @@ ao_sleep(void *wchan) switch (type) { case 'F': ao_flight_ground_accel = a; + ao_config.accel_plus_g = a; + ao_config.accel_minus_g = a + 530; ao_flight_started = 1; break; case 'S': |