From 027e42dc581fe6bd49b30c5b347fe86699df53b7 Mon Sep 17 00:00:00 2001 From: David Volovskiy Date: Wed, 31 Jul 2024 07:25:09 -0400 Subject: [PATCH] Moved a few lines around to match main --- movement/movement.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/movement/movement.c b/movement/movement.c index a4ca19a..33e7415 100644 --- a/movement/movement.c +++ b/movement/movement.c @@ -642,21 +642,21 @@ static movement_event_type_t _figure_out_button_event(bool pin_level, movement_e } static void light_btn_action(void) { - _movement_reset_inactivity_countdown(); bool pin_level = watch_get_pin_level(BTN_LIGHT); + _movement_reset_inactivity_countdown(); event.event_type = _figure_out_button_event(pin_level, EVENT_LIGHT_BUTTON_DOWN, &movement_state.light_down_timestamp); } static void mode_btn_action(void) { - _movement_reset_inactivity_countdown(); bool pin_level = watch_get_pin_level(BTN_MODE); + _movement_reset_inactivity_countdown(); event.event_type = _figure_out_button_event(pin_level, EVENT_MODE_BUTTON_DOWN, &movement_state.mode_down_timestamp); } static void alarm_btn_action(void) { - _movement_reset_inactivity_countdown(); bool pin_level = watch_get_pin_level(BTN_ALARM); uint8_t event_type = _figure_out_button_event(pin_level, EVENT_ALARM_BUTTON_DOWN, &movement_state.alarm_down_timestamp); + _movement_reset_inactivity_countdown(); if (movement_state.ignore_alarm_btn_after_sleep){ if (event_type == EVENT_ALARM_BUTTON_UP || event_type == EVENT_ALARM_LONG_UP) movement_state.ignore_alarm_btn_after_sleep = false; return;