diff --git a/src/buttonHandler.c b/src/buttonHandler.c index 4d18032..41d90ec 100644 --- a/src/buttonHandler.c +++ b/src/buttonHandler.c @@ -2,9 +2,10 @@ #include "mgos_gpio.h" #include "mgos_timers.h" #include "buttonHandler.h" +#include -#define ON_BOARD_BUTTON_PIN 5 -#define MAX_TIME_BETWEEN_MULTIPLE_BUTTON_PRESS_EVENTS 200 +#define ON_BOARD_BUTTON_PIN 0 +#define MAX_TIME_BETWEEN_MULTIPLE_BUTTON_PRESS_EVENTS 0.3 /* seconds */ static double lastButtonPressTime = 0; static uint8_t buttonPressCounter = 0; @@ -31,7 +32,7 @@ void add_button_press_callback(int numberPressed, button_press_callback cb) { static void multiPressButtonHandler(void *arg) { (void) arg; - LOG(LL_DEBUG, ("multiPressButtonHandler called after %d presses", buttonPressCounter)); + LOG(LL_DEBUG, ("multiPressButtonHandler called after %d presses, uptime=%f", buttonPressCounter, mgos_uptime())); multiPressTimerId = 0; // timer used only once, thus we clear it for (int i=0; i