From 4d25ea49c23dcfa0bbbe8c42eee37686e764997b Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Fri, 11 Dec 2015 11:35:53 -0600 Subject: fix SW1 issue on cold boot by initializing _sw#_running variables --- ButtonHandler/ButtonHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ButtonHandler') diff --git a/ButtonHandler/ButtonHandler.cpp b/ButtonHandler/ButtonHandler.cpp index 279fc5b..dfdbd92 100644 --- a/ButtonHandler/ButtonHandler.cpp +++ b/ButtonHandler/ButtonHandler.cpp @@ -89,6 +89,8 @@ ButtonHandler::ButtonHandler(osThreadId main) _sw2(PA_11), _sw1_time(0), _sw2_time(0), + _sw1_running(false), + _sw2_running(false), _event(none), _debounce_time(20), _hold_threshold(500) -- cgit v1.2.3