aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-11-25 15:12:37 +0100
committerLars-Dominik Braun <lars@6xq.net>2014-11-25 15:12:37 +0100
commit5b152c8515de5b23872247c8b16dae27404cda4f (patch)
treecf5aa0c453ca2dcf45c2060f26526c0eccc06bf7
parente9ec75dbd246726f9b8e8fb8a5e6294398afede8 (diff)
downloadhourglass-5b152c8515de5b23872247c8b16dae27404cda4f.tar.gz
hourglass-5b152c8515de5b23872247c8b16dae27404cda4f.tar.bz2
hourglass-5b152c8515de5b23872247c8b16dae27404cda4f.zip
gyro: Reduce sensitivity
-rw-r--r--gyro.c6
1 files 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);