Skip to content

Commit

Permalink
Merge pull request #73 from Haxk20/patch-1
Browse files Browse the repository at this point in the history
main: key_handler.cpp: Remove redundant checks
  • Loading branch information
Ralim authored Jul 20, 2024
2 parents 0751b1c + 3116be8 commit 6c1f50f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions apps/main/key_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void send_prev_track(void) {
}
void app_key_single_tap(APP_KEY_STATUS *status, void *param) {
TRACE(2, "%s event %d", __func__, status->event);

/*
if (!app_tws_ibrt_tws_link_connected()) {
// No other bud paired
TRACE(0, "Handling %s in single bud mode", __func__);
Expand All @@ -137,6 +137,8 @@ void app_key_single_tap(APP_KEY_STATUS *status, void *param) {
send_play_pause();
}
}
*/
send_play_pause();
}
void app_key_double_tap(APP_KEY_STATUS *status, void *param) {
TRACE(2, "%s event %d", __func__, status->event);
Expand Down Expand Up @@ -186,15 +188,6 @@ void app_key_quad_tap(APP_KEY_STATUS *status, void *param) {
// No other bud paired
TRACE(0, "Handling %s in single bud mode", __func__);
send_vol_down();
} else {
// Bud's are working as a pair
if (app_tws_is_left_side()) {
TRACE(0, "Handling %s as left bud", __func__);
// Lefty
} else {
TRACE(0, "Handling %s as right bud", __func__);
// Righty
}
}
}

Expand Down Expand Up @@ -268,4 +261,4 @@ void app_key_init_on_charging(void) {
for (i = 0; i < (sizeof(key_cfg) / sizeof(APP_KEY_HANDLE)); i++) {
app_key_handle_registration(&key_cfg[i]);
}
}
}

0 comments on commit 6c1f50f

Please sign in to comment.