Library for my home monitoring classes and serial communication protocol. It monitors temperature and movement on the mbed application board.
Diff: Motion/Motion.cpp
- Revision:
- 1:2f5a62eb52ad
- Parent:
- 0:3f846fc933a2
--- a/Motion/Motion.cpp Sun Sep 01 23:35:18 2013 +0000 +++ b/Motion/Motion.cpp Tue Sep 03 08:54:55 2013 +0000 @@ -7,15 +7,21 @@ #include <string> #include <sstream> -// FIXME - add timestamp to motion samples +// TODO - add timestamp to motion samples #include "Motion.h" Motion::Motion() { // These are motion deltas based on playing with - // mbed application board motion sensors - min_motion.x = 0.097; - min_motion.y = 0.097; - min_motion.z = 0.097; + // mbed application board motion sensors. + // + // Originally 0.097 was sufficient, but I get false + // motion of 0.14 sometimes. This makes it somewhat less + // responsive to small motion, but better than too many + // false alarms. I should look into motion sensors to + // see what is up or if something has been fixed?? + min_motion.x = 0.15; + min_motion.y = 0.15; + min_motion.z = 0.15; max_samples_limit = 100; // Max motion buffer is 100 deep max_samples = 20; sample_ptr = 0;