From: Keith Packard Date: Mon, 14 Nov 2011 07:03:22 +0000 (-0800) Subject: altos: Fix pad orientation for pre-1.1 boards X-Git-Tag: 1.0.9.4~68 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=dbf7c0c59854e040b65f068069d80716f02fc1bc 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 --- 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