diff options
author | Keith Packard <keithp@keithp.com> | 2011-11-13 23:03:22 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-11-13 23:03:22 -0800 |
commit | dbf7c0c59854e040b65f068069d80716f02fc1bc (patch) | |
tree | 3a631fb57bf0a56ae500b2c832f65270e2c8fcf5 | |
parent | c1e293ff4953b51c19af8b52f2999419ea84e7e5 (diff) |
altos: Fix pad orientation for pre-1.1 boards
They use a different code path for accel as they don't have the
VCC compensation code in place.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/core/ao_sample.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/ao_sample.c b/src/core/ao_sample.c index b2b8e9f6..2bf9632f 100644 --- a/src/core/ao_sample.c +++ b/src/core/ao_sample.c @@ -182,6 +182,11 @@ ao_sample(void) if (ao_config.pad_orientation != AO_PAD_ORIENTATION_ANTENNA_UP) ao_sample_accel = 0x7fff - ao_sample_accel; ao_adc->accel = ao_sample_accel; +#else + if (ao_config.pad_orientation != AO_PAD_ORIENTATION_ANTENNA_UP) { + ao_sample_accel = 0x7fff - ao_sample_accel; + ao_adc->accel = ao_sample_accel; + } #endif #endif |