summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-03-17 18:56:01 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-03-17 18:56:01 +0100
commit86c7c308e85bbde06fe298414bb23963f44b6cf5 (patch)
treecc614d7c6e122f347abdc5b43c6cb1f99352b514 /src/system.h
parent092f52f813dbec9269e0b35bd984209afaf1a8d5 (diff)
add software debouncing in the animation switcher
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/system.h b/src/system.h
index 870ec35..e5ba9ef 100644
--- a/src/system.h
+++ b/src/system.h
@@ -19,6 +19,7 @@
class System {
private:
uint16_t want_shutdown;
+ uint8_t btn_debounce;
uint8_t current_anim_no;
void shutdown(void);
void receive(void);
@@ -57,7 +58,7 @@ class System {
ButtonMask btnMask;
public:
- System() { want_shutdown = 0; rxExpect = START1; current_anim_no = 0; btnMask = BUTTON_NONE;};
+ System() { want_shutdown = 0; rxExpect = START1; current_anim_no = 0; btnMask = BUTTON_NONE; btn_debounce = 0;};
/**
* Initial MCU setup. Turns off unused peripherals to save power