From edbc5d27c8c2936b59ff5289276d9198b501ebc8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 28 Jun 2012 17:43:36 -0700 Subject: [PATCH] altos: Declare cc1111 accel_ref as unsigned so the math works If accel_ref is signed, then the careful shifting and dividing dance necessary to correct for changes in the relationship between the 5V and 3.3V supplies always generates zero. Signed-off-by: Keith Packard --- src/cc1111/ao_arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc1111/ao_arch.h b/src/cc1111/ao_arch.h index cece09eb..8d9e4952 100644 --- a/src/cc1111/ao_arch.h +++ b/src/cc1111/ao_arch.h @@ -206,7 +206,7 @@ struct ao_adc { int16_t sense_d; /* drogue continuity sense */ int16_t sense_m; /* main continuity sense */ #if HAS_ACCEL_REF - int16_t accel_ref; /* acceleration reference */ + uint16_t accel_ref; /* acceleration reference */ #endif }; -- 2.30.2