feat: wi-fi - expand support and fix issues, add GUI components
This commit is contained in:
@@ -180,6 +180,41 @@ struct DesktopState {
|
||||
uint64_t net_cfg_last_poll;
|
||||
Rect net_icon_rect;
|
||||
|
||||
// Registered link-layer interfaces. The IP configuration is global to the
|
||||
// stack, so the wired and wireless popups use `active` to decide which of
|
||||
// them owns the address currently on screen.
|
||||
static constexpr int MAX_NETIFS = 4;
|
||||
montauk::abi::NetIfInfo netifs[MAX_NETIFS];
|
||||
int netif_count;
|
||||
bool eth_present;
|
||||
|
||||
// ---- Wi-Fi -------------------------------------------------------------
|
||||
// The panel entry exists only when a supported adapter is present.
|
||||
static constexpr int MAX_WIFI_NETWORKS = 32;
|
||||
static constexpr int WIFI_SSID_CAP = 36;
|
||||
static constexpr int WIFI_PSK_CAP = 72;
|
||||
|
||||
SvgIcon icon_wifi;
|
||||
bool wifi_present;
|
||||
bool wifi_popup_open;
|
||||
Rect wifi_icon_rect;
|
||||
montauk::abi::WifiInfo wifi_info;
|
||||
montauk::abi::WifiNetwork wifi_networks[MAX_WIFI_NETWORKS];
|
||||
int wifi_network_count;
|
||||
uint64_t wifi_last_poll;
|
||||
uint32_t wifi_scan_generation;
|
||||
bool wifi_scanning;
|
||||
int wifi_scroll; // first visible row of the list
|
||||
bool wifi_boot_scan_started; // the automatic scan at startup
|
||||
bool wifi_autoconnect_done; // saved-network join already tried
|
||||
bool wifi_joining; // a join we started is in flight
|
||||
bool wifi_dhcp_pending; // ask for a lease once the link is up
|
||||
bool wifi_dhcp_waiting; // dhcp.elf running, no address yet
|
||||
char wifi_joining_ssid[WIFI_SSID_CAP];
|
||||
char wifi_status[96]; // last result line in the popup
|
||||
uint64_t wifi_status_time;
|
||||
|
||||
|
||||
bool vol_popup_open;
|
||||
Rect vol_icon_rect;
|
||||
int vol_level; // 0-100
|
||||
|
||||
Reference in New Issue
Block a user