Skip to content

Commit

Permalink
feat: Fix button handler advs
Browse files Browse the repository at this point in the history
  • Loading branch information
JahazielLem committed Oct 25, 2024
1 parent 13d7e14 commit 13e7401
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions firmware/main/apps/ble/adv_scanner/adv_scan_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ static void adv_scanner_module_reset_menu() {
menus_module_set_app_state(true, adv_scanner_module_cb_event);
}

static void adv_scanner_module_reset_start_menu() {
ble_scanner_register_cb(NULL);
menus_module_reset();
adv_scanner_module_reset_menu();
}

static void adv_filter_selection(uint8_t selection) {
set_filter_type(selection);
adv_scanner_module_reset_menu();
Expand Down Expand Up @@ -65,6 +71,10 @@ static void adv_scanner_module_cb_event(uint8_t button_name,
} else if (current_item == SCAN_FILTER) {
adv_scanner_display_filter();
} else if (current_item == SCAN_START) {
general_screen_display_card_information_handler(
"Scanning", "Scanning for devices",
adv_scanner_module_reset_start_menu,
adv_scanner_module_reset_start_menu);
ble_scanner_register_cb(adv_scanner_display_record);
ble_scanner_begin();
}
Expand Down

0 comments on commit 13e7401

Please sign in to comment.