diff --git a/application.c b/application.c index e5aef85..e1dff89 100644 --- a/application.c +++ b/application.c @@ -86,7 +86,7 @@ static bool drv8825_reached = false; /**< set when the goal is reached */ #define DIAL_CYCLE_STEPS 4200U /**< number of steps for the hour dial to make a round */ #define DIAL_MIDNIGHT_STEPS 3207U /**< number of steps after dial detection for dials to show midnight */ static volatile uint32_t dial_steps = 0; /**< set to drv8825_steps when dial is nearby */ - +static volatile bool reed_flag = false; #define WSMATRIX_HEIGHT (2 * 8) /**< WS2812b panel height, in pixels */ #define WSMATRIX_WIDTH 32 /**< WS2812b panel width, in pixels */ @@ -1231,6 +1231,7 @@ void TIM_ISR(DRV8825_STEP_TIMER)(void) void GPIO_EXTI_ISR(DIAL_SWITCH_PIN)(void) { exti_reset_request(GPIO_EXTI(DIAL_SWITCH_PIN)); // reset interrupt + reed_flag = true; // I don't know why, but the RGBPANEL_ISR does trigger this EXTI if (gpio_get(GPIO_PORT(DIAL_SWITCH_PIN), GPIO_PIN(DIAL_SWITCH_PIN))) { // be sure the pin is actually low return;