Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion selfdrive/ui/mici/layouts/settings/device.py
Copy link
Copy Markdown
Contributor

@sshane sshane Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want a software subsection, and use scrolling list of branches like 3X (horizontally), but maybe for later unless @nickorie wants now

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i definitely just want to ship the full thing instead of this. do we have all the ui primitives in place now to make this super easy?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not familiar enough with the typical user flows for branch switching to make a determination right now of what the best format for the c4 should be. That being said, the only new element this seems like it might need (later) is an icon; otherwise buttons, scrolling text, keyboard, etc. should all be in there between the regular scrollers and the wifi scroller.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from openpilot.common.time_helpers import system_time_valid
from openpilot.system.ui.widgets.scroller import NavRawScrollPanel, NavScroller
from openpilot.selfdrive.ui.mici.widgets.button import BigButton, BigCircleButton
from openpilot.selfdrive.ui.mici.widgets.dialog import BigDialog, BigConfirmationDialog
from openpilot.selfdrive.ui.mici.widgets.dialog import BigDialog, BigConfirmationDialog, BigInputDialog
from openpilot.selfdrive.ui.mici.widgets.pairing_dialog import PairingDialog
from openpilot.selfdrive.ui.mici.onroad.driver_camera_dialog import DriverCameraDialog
from openpilot.selfdrive.ui.mici.layouts.onboarding import TrainingGuide, TermsPage
Expand Down Expand Up @@ -337,9 +337,25 @@ def uninstall_openpilot_callback():
terms_btn = BigButton("terms &\nconditions", "", gui_app.texture("icons_mici/settings/device/info.png", 64, 64))
terms_btn.set_click_callback(lambda: gui_app.push_widget(ReviewTermsPage()))

def switch_branch_handle_selection(new_branch: str):
if new_branch:
ui_state.params.put("UpdaterTargetBranch", new_branch)
os.system("pkill -SIGUSR1 -f system.updated.updated")

def switch_branch_clicked():
current_branch = ui_state.params.get("GitBranch") or ""
dlg = BigInputDialog("enter branch name:", current_branch, minimum_length=1,
confirm_callback=switch_branch_handle_selection)
gui_app.push_widget(dlg)
return

switch_branch_btn = BigButton("switch branch", "", gui_app.texture("icons_mici/settings/device/update.png", 64, 64))
switch_branch_btn.set_click_callback(switch_branch_clicked)

self._scroller.add_widgets([
DeviceInfoLayoutMici(),
UpdateOpenpilotBigButton(),
switch_branch_btn,
PairBigButton(),
review_training_guide_btn,
driver_cam_btn,
Expand Down
Loading