IO is an event based input manager which permit to select which composents are manged on your system
Dependencies: C12832 FXOS8700Q LM75B MMA7660
Input.cpp
- Committer:
- co838_app56
- Date:
- 2016-02-25
- Revision:
- 4:50e2aefe516b
- Parent:
- 3:1ab88130bb9d
File content as of revision 4:50e2aefe516b:
#include "IO.hpp" Input::Input(void) { _tickerAnalog.attach(this, &Input::checkAnalog, 0.1); _tickerVector.attach(this, &Input::checkVector, 0.3); } Input::operator bool(void) { return (!_events.empty()); } Event Input::pull(void) { Event event = _events.front(); _events.pop(); return (event); } void Input::setAnalogSampleSpeed(float time) { _tickerAnalog.attach(this, &Input::checkAnalog, time); } void Input::setVectorSampleSpeed(float time) { _tickerVector.attach(this, &Input::checkVector, time); } void Input::setEnable(void) {} void Input::setPrecision(void) {} void Input::checkAnalog(void) {} void Input::checkVector(void) {}