From e2e3038c627ea7460915cdd535cb91301af614a7 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 26 Feb 2015 14:39:30 +0100 Subject: accel: Stop polling Use freefall interrupts instead. This drop the fancy horizon/shake detection algorithms, but it works surprisingly well and is way more energy-efficient. Shake detection is a little too sensitive imo and horizon detection needs some tweaking too. --- accel.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'accel.h') diff --git a/accel.h b/accel.h index edb2540..fcaaafd 100644 --- a/accel.h +++ b/accel.h @@ -13,11 +13,9 @@ typedef uint8_t horizon; void accelInit (); void accelStart (); void accelProcess (); -int8_t accelGetZ (); -int8_t accelGetNormalizedZ (); -uint8_t accelGetShakeCount (); +horizon accelGetHorizon (bool * const); void accelResetShakeCount (); -horizon accelGetHorizon (); +uint8_t accelGetShakeCount (); #endif /* ACCEL_H */ -- cgit v1.2.3