From 5b152c8515de5b23872247c8b16dae27404cda4f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 25 Nov 2014 15:12:37 +0100 Subject: gyro: Reduce sensitivity --- gyro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gyro.c b/gyro.c index ac9ec1c..f291d91 100644 --- a/gyro.c +++ b/gyro.c @@ -57,9 +57,9 @@ void gyroStart () { * disable power-down-mode, enable z * defaults * low-active (does not work?), push-pull, drdy on int2 - * select 500dps + * select 2000dps */ - uint8_t data[] = {0b00001100, 0b0, 0b00101000, 0b00010000}; + uint8_t data[] = {0b00001100, 0b0, 0b00101000, 0b00110000}; if (!twRequest (TWM_WRITE, L3GD20, L3GD20_CTRLREG1, data, sizeof (data)/sizeof (*data))) { @@ -74,7 +74,7 @@ void gyroStart () { /* calculate ticks for z rotation */ static void gyroProcessTicks () { - const uint8_t shift = 14; + const uint8_t shift = 13; const uint32_t max = (1 << shift); const uint32_t mask = ~(max-1); -- cgit v1.2.3