|
|
@ -2,7 +2,6 @@ import pyray as rl |
|
|
|
from dataclasses import dataclass |
|
|
|
from dataclasses import dataclass |
|
|
|
from enum import IntEnum |
|
|
|
from enum import IntEnum |
|
|
|
from collections.abc import Callable |
|
|
|
from collections.abc import Callable |
|
|
|
from openpilot.selfdrive.ui.layouts.network import NetworkLayout |
|
|
|
|
|
|
|
from openpilot.selfdrive.ui.layouts.settings.developer import DeveloperLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.settings.developer import DeveloperLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.settings.device import DeviceLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.settings.device import DeviceLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.settings.firehose import FirehoseLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.settings.firehose import FirehoseLayout |
|
|
@ -10,7 +9,9 @@ from openpilot.selfdrive.ui.layouts.settings.software import SoftwareLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.settings.toggles import TogglesLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.settings.toggles import TogglesLayout |
|
|
|
from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos |
|
|
|
from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos |
|
|
|
from openpilot.system.ui.lib.text_measure import measure_text_cached |
|
|
|
from openpilot.system.ui.lib.text_measure import measure_text_cached |
|
|
|
|
|
|
|
from openpilot.system.ui.lib.wifi_manager import WifiManagerWrapper |
|
|
|
from openpilot.system.ui.widgets import Widget |
|
|
|
from openpilot.system.ui.widgets import Widget |
|
|
|
|
|
|
|
from openpilot.system.ui.widgets.network import WifiManagerUI |
|
|
|
|
|
|
|
|
|
|
|
# Settings close button |
|
|
|
# Settings close button |
|
|
|
SETTINGS_CLOSE_TEXT = "×" |
|
|
|
SETTINGS_CLOSE_TEXT = "×" |
|
|
@ -53,9 +54,12 @@ class SettingsLayout(Widget): |
|
|
|
self._current_panel = PanelType.DEVICE |
|
|
|
self._current_panel = PanelType.DEVICE |
|
|
|
|
|
|
|
|
|
|
|
# Panel configuration |
|
|
|
# Panel configuration |
|
|
|
|
|
|
|
self.wifi_manager = WifiManagerWrapper() |
|
|
|
|
|
|
|
self.wifi_ui = WifiManagerUI(self.wifi_manager) |
|
|
|
|
|
|
|
|
|
|
|
self._panels = { |
|
|
|
self._panels = { |
|
|
|
PanelType.DEVICE: PanelInfo("Device", DeviceLayout()), |
|
|
|
PanelType.DEVICE: PanelInfo("Device", DeviceLayout()), |
|
|
|
PanelType.NETWORK: PanelInfo("Network", NetworkLayout()), |
|
|
|
PanelType.NETWORK: PanelInfo("Network", self.wifi_ui), |
|
|
|
PanelType.TOGGLES: PanelInfo("Toggles", TogglesLayout()), |
|
|
|
PanelType.TOGGLES: PanelInfo("Toggles", TogglesLayout()), |
|
|
|
PanelType.SOFTWARE: PanelInfo("Software", SoftwareLayout()), |
|
|
|
PanelType.SOFTWARE: PanelInfo("Software", SoftwareLayout()), |
|
|
|
PanelType.FIREHOSE: PanelInfo("Firehose", FirehoseLayout()), |
|
|
|
PanelType.FIREHOSE: PanelInfo("Firehose", FirehoseLayout()), |
|
|
|