From 718cfc46128bbe4aa28656944265a5a7e76d6749 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Thu, 29 Sep 2016 13:44:14 +1000 Subject: [PATCH] Retune acceleromter to be more sensive --- workspace/ts100/src/MMA8652FC.c | 2 +- workspace/ts100/src/Modes.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/workspace/ts100/src/MMA8652FC.c b/workspace/ts100/src/MMA8652FC.c index a95657c391..9f1084c804 100644 --- a/workspace/ts100/src/MMA8652FC.c +++ b/workspace/ts100/src/MMA8652FC.c @@ -38,7 +38,7 @@ void StartUp_Acceleromter(void) { I2C_RegisterWrite( CTRL_REG2, 0x40); // Reset all registers to POR values delayMs(2); // ~1ms delay I2C_RegisterWrite(FF_MT_CFG_REG, 0x78);// Enable motion detection for X and Y axis, latch enabled - I2C_RegisterWrite(FF_MT_THS_REG, 0x10); // Set threshold to about 0.25g + I2C_RegisterWrite(FF_MT_THS_REG, 0x0F); // Set threshold I2C_RegisterWrite(FF_MT_COUNT_REG, 0x01); // Set debounce to 100ms I2C_RegisterWrite( CTRL_REG4, 0x04); // Enable motion interrupt diff --git a/workspace/ts100/src/Modes.c b/workspace/ts100/src/Modes.c index 23333243cf..b038e4d22d 100644 --- a/workspace/ts100/src/Modes.c +++ b/workspace/ts100/src/Modes.c @@ -48,9 +48,9 @@ void ProcessUI() { //We need to check the timer for movement in case we need to goto idle if (systemSettings.movementEnabled) if (millis() - getLastMovement() - > (systemSettings.SleepTime * 10000)) { + > (systemSettings.SleepTime * 60000)) { if (millis() - getLastButtonPress() - > (systemSettings.SleepTime * 10000)) { + > (systemSettings.SleepTime * 60000)) { operatingMode = SLEEP; return; }