Skip to content

Commit

Permalink
Launcher: Automatically enable wifi when selecting a network
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Aug 7, 2024
1 parent ee237ec commit 16e5016
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions launcher/main/wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ static rg_gui_event_t wifi_select_cb(rg_gui_option_t *option, rg_gui_event_t eve
int sel = rg_gui_dialog("Select saved AP", options, rg_settings_get_number(NS_WIFI, SETTING_WIFI_SLOT, 0));
if (sel != RG_DIALOG_CANCELLED)
{
rg_settings_set_number(NS_WIFI, SETTING_WIFI_ENABLE, true);
rg_settings_set_number(NS_WIFI, SETTING_WIFI_SLOT, sel);
rg_network_wifi_stop();
rg_network_wifi_load_config(sel);
wifi_toggle(wifi_enable);
wifi_toggle(true);
}
gui_redraw();
}
Expand All @@ -101,7 +103,6 @@ static rg_gui_event_t wifi_access_point_cb(rg_gui_option_t *option, rg_gui_event
.channel = 6,
.ap_mode = true,
});
rg_network_wifi_start();
wifi_toggle(true);
}
}
Expand Down

0 comments on commit 16e5016

Please sign in to comment.