Library for my home monitoring classes and serial communication protocol. It monitors temperature and movement on the mbed application board.
Motion/Motion.h
- Committer:
- groletter
- Date:
- 2013-09-01
- Revision:
- 0:3f846fc933a2
- Child:
- 2:84432add9142
File content as of revision 0:3f846fc933a2:
#ifndef MOTION_H #define MOTION_H #include <vector> #include <string> #include "HomeMonUtils.h" struct motion_vec { double x; double y; double z; }; class Motion { private: motion_vec min_motion; int max_samples_limit; int max_samples; int sample_ptr; bool wrapped_once; std::vector<std::string> motion_samples; public: Motion(); motion_vec get_motion_thresh(void); bool set_motion_thresh(motion_vec); void add_sample(double motion_sample); const std::vector<std::string> &get_samples(); bool change_max_samples(int); int get_max_samples(); }; #endif