Skip to content

Commit 583370a

Browse files
committed
minor fix
1 parent 5a0d149 commit 583370a

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.5.1
4+
5+
- Fixed issue where the command label could be wrong when exiting a command
6+
37
## v1.5.0
48

59
- Support for new pcap marker handling by the firmware as of v1.8

src/menu.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,18 @@ static void execute_menu_command(AppState* state, const MenuCommand* command) {
14041404
return;
14051405
}
14061406

1407+
// Handle variable WiFi scan command (scan modes like APs / APs Live / Stations / All)
1408+
if(state->current_view == 10 && state->current_index == 0) {
1409+
const CyclingMenuDef* current_scan = &wifi_scan_modes[current_wifi_scan_index];
1410+
// Save view and show terminal log
1411+
state->previous_view = state->current_view;
1412+
uart_receive_data(state->uart_context, state->view_dispatcher, state, "", "", "");
1413+
state->current_view = 5;
1414+
furi_delay_ms(5);
1415+
send_uart_command(current_scan->command, state);
1416+
return;
1417+
}
1418+
14071419
// Handle variable BLE spam command
14081420
if(state->current_view == 22 && state->current_index == 0) {
14091421
const CyclingMenuDef* current_ble_spam = &ble_spam_commands[current_ble_spam_index];
@@ -1522,6 +1534,19 @@ void show_wifi_scanning_menu(AppState* state) {
15221534
"Scanning & Probing",
15231535
state->wifi_scanning_menu,
15241536
10);
1537+
1538+
// Ensure the first item label reflects the currently selected scan mode
1539+
// (so the menu shows "Scan: (APs Live)" etc. after cycling)
1540+
submenu_change_item_label(
1541+
state->wifi_scanning_menu, 0, wifi_scan_modes[current_wifi_scan_index].label);
1542+
1543+
// Also persist labels for list/select/listen cycling entries
1544+
submenu_change_item_label(
1545+
state->wifi_scanning_menu, 1, wifi_list_modes[current_wifi_list_index].label);
1546+
submenu_change_item_label(
1547+
state->wifi_scanning_menu, 2, wifi_select_modes[current_wifi_select_index].label);
1548+
submenu_change_item_label(
1549+
state->wifi_scanning_menu, 3, wifi_listen_modes[current_wifi_listen_index].label);
15251550
}
15261551

15271552
void show_wifi_capture_menu(AppState* state) {
@@ -1542,6 +1567,10 @@ void show_wifi_attack_menu(AppState* state) {
15421567
"Attacks",
15431568
state->wifi_attack_menu,
15441569
12);
1570+
1571+
// Ensure beacon spam cycling label persists
1572+
submenu_change_item_label(
1573+
state->wifi_attack_menu, 0, beacon_spam_commands[current_beacon_index].label);
15451574
}
15461575

15471576
void show_wifi_network_menu(AppState* state) {
@@ -1562,6 +1591,10 @@ void show_wifi_settings_menu(AppState* state) {
15621591
"Settings & Hardware",
15631592
state->wifi_settings_menu,
15641593
14);
1594+
1595+
// Ensure rgbmode cycling label persists
1596+
submenu_change_item_label(
1597+
state->wifi_settings_menu, 0, rgbmode_commands[current_rgb_index].label);
15651598
}
15661599

15671600
void show_ble_scanning_menu(AppState* state) {
@@ -1592,6 +1625,10 @@ void show_ble_attack_menu(AppState* state) {
15921625
"Attacks & Spoofing",
15931626
state->ble_attack_menu,
15941627
22);
1628+
1629+
// Ensure BLE spam cycling label persists
1630+
submenu_change_item_label(
1631+
state->ble_attack_menu, 0, ble_spam_commands[current_ble_spam_index].label);
15951632
}
15961633

15971634
void show_wifi_menu(AppState* state) {

0 commit comments

Comments
 (0)