From 5748ee636fc1c1ad61065c7426a5cf38c5732641 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 1 Jun 2026 23:34:46 -0400 Subject: [PATCH] Change accel subscription logic --- src/c/main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/c/main.c b/src/c/main.c index 24d34e8..b48dfac 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -260,10 +260,9 @@ static void apply_settings(bool first_run) { // changes to low fuel threshold batt_callback(battery_state_service_peek()); - // sub/unsub from accelerometer if needed - if (settings.DateTimeoutSecs == 0) { - accel_tap_service_unsubscribe(); - } else { + // re-sub accelerometer + accel_tap_service_unsubscribe(); + if (settings.DateTimeoutSecs != 0) { accel_tap_service_subscribe(accel_tap_handler); } } @@ -305,9 +304,7 @@ static void main_window_load() { } static void main_window_unload() { - if (settings.DateTimeoutSecs != 0) { - accel_tap_service_unsubscribe(); - } + accel_tap_service_unsubscribe(); layer_destroy(s_fuel_mg_layer); layer_destroy(s_temp_mg_layer); bitmap_layer_destroy(s_f_layer);