mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-07 17:26:52 +08:00
@@ -733,8 +733,7 @@ class WifiManager:
|
||||
active_wifi_connection, _ = self._get_active_wifi_connection()
|
||||
networks = [Network.from_dbus(ssid, ap_list, ssid in self._connections,
|
||||
self._connections.get(ssid) == active_wifi_connection) for ssid, ap_list in aps.items()]
|
||||
# sort with quantized strength to reduce jumping
|
||||
networks.sort(key=lambda n: (-n.is_connected, -n.is_saved, -round(n.strength / 100 * 2), n.ssid.lower()))
|
||||
networks.sort(key=lambda n: (-n.is_connected, -n.is_saved, -n.strength, n.ssid.lower()))
|
||||
self._networks = networks
|
||||
|
||||
self._update_active_connection_info()
|
||||
|
||||
Reference in New Issue
Block a user