KeyboardManager: a class to manage the polling of a switch-matrix keyboard
KeyboardStateChangeMonitor.cpp@3:1310c57aca77, 2011-02-03 (annotated)
- Committer:
- osmeest
- Date:
- Thu Feb 03 22:01:57 2011 +0000
- Revision:
- 3:1310c57aca77
- Parent:
- 2:eb4cc53ff33d
improve code structure, add key mapping and long key press handling
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
osmeest | 3:1310c57aca77 | 1 | #include "kbd_mgr/KeyboardStateChangeMonitor.h" |
osmeest | 3:1310c57aca77 | 2 | |
osmeest | 3:1310c57aca77 | 3 | namespace kbd_mgr { |
osmeest | 3:1310c57aca77 | 4 | |
osmeest | 3:1310c57aca77 | 5 | void KeyboardStateChangeMonitor::handleState(const KeyboardState &newState) |
osmeest | 3:1310c57aca77 | 6 | { |
osmeest | 3:1310c57aca77 | 7 | if (newState != this->lastState) { |
osmeest | 3:1310c57aca77 | 8 | invokeHandler(newState); |
osmeest | 3:1310c57aca77 | 9 | this->lastState = newState; |
osmeest | 3:1310c57aca77 | 10 | } |
osmeest | 3:1310c57aca77 | 11 | } |
osmeest | 3:1310c57aca77 | 12 | |
osmeest | 3:1310c57aca77 | 13 | } // kbd_mgr |