From 200cc21381486ccec1f4855f638a8e1046a401d8 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Fri, 13 Nov 2015 15:52:30 -0600 Subject: refactor button class to run a thread - handle button holds when the threshold is reached, not when the button is released --- ButtonHandler/ButtonHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ButtonHandler/ButtonHandler.h') diff --git a/ButtonHandler/ButtonHandler.h b/ButtonHandler/ButtonHandler.h index cfca1d7..57f768d 100644 --- a/ButtonHandler/ButtonHandler.h +++ b/ButtonHandler/ButtonHandler.h @@ -20,13 +20,13 @@ class ButtonHandler { ButtonEvent getButtonEvent(); - private: void sw1_fall(); void sw1_rise(); void sw2_fall(); void sw2_rise(); osThreadId _main; + Thread _thread; InterruptIn _sw1; InterruptIn _sw2; Timer _sw1_timer; -- cgit v1.2.3