        updateBtn->setEnabled(false);
      }
      std::system("pkill -1 -f selfdrive.updated");
    });
  
  
    auto uninstallBtn = new ButtonControl(tr("Uninstall %1").arg(getBrand()), tr("UNINSTALL"));
    connect(uninstallBtn, &ButtonControl::clicked, [&]() {
      if (ConfirmationDialog::confirm(tr("Are you sure you want to uninstall?"), this)) {
        params.putBool("DoUninstall", true);
 
</s> remove   QWidget *widgets[] = {versionLbl, lastUpdateLbl, updateBtn, gitBranchLbl, gitCommitLbl, osVersionLbl, uninstallBtn};
 </s> add   QWidget *widgets[] = {versionLbl, lastUpdateLbl, updateBtn, branchSwitcherBtn, gitBranchLbl, gitCommitLbl, osVersionLbl, uninstallBtn}; </s> remove   new_version: bool = cur_hash != upstream_hash
 </s> add   new_version = cur_hash != upstream_hash
  connect(uiState(), &UIState::offroadTransition, updateBtn, &QPushButton::setEnabled);

  branchSwitcherBtn = new ButtonControl(tr("Switch Branch"), tr("ENTER"));
  connect(branchSwitcherBtn, &ButtonControl::clicked, [=]() {
    QString branch = InputDialog::getText(tr("Enter name of new branch"), this);
    if (branch.isEmpty()) {
      params.remove("SwitchToBranch");
    } else {
      params.put("SwitchToBranch", branch.toStdString());
    }
    std::system("pkill -1 -f selfdrive.updated");
  });
  connect(uiState(), &UIState::offroadTransition, branchSwitcherBtn, &QPushButton::setEnabled);
        updateBtn->setEnabled(false);
      }
      std::system("pkill -1 -f selfdrive.updated");
    });
  connect(uiState(), &UIState::offroadTransition, updateBtn, &QPushButton::setEnabled);

  branchSwitcherBtn = new ButtonControl(tr("Switch Branch"), tr("ENTER"));
  connect(branchSwitcherBtn, &ButtonControl::clicked, [=]() {
    QString branch = InputDialog::getText(tr("Enter name of new branch"), this);
    if (branch.isEmpty()) {
      params.remove("SwitchToBranch");
    } else {
      params.put("SwitchToBranch", branch.toStdString());
    }
    std::system("pkill -1 -f selfdrive.updated");
  });
  connect(uiState(), &UIState::offroadTransition, branchSwitcherBtn, &QPushButton::setEnabled);
  
    auto uninstallBtn = new ButtonControl(tr("Uninstall %1").arg(getBrand()), tr("UNINSTALL"));
    connect(uninstallBtn, &ButtonControl::clicked, [&]() {
      if (ConfirmationDialog::confirm(tr("Are you sure you want to uninstall?"), this)) {
        params.putBool("DoUninstall", true);
keep keep keep keep replace keep keep keep keep keep
 updated: add branch switching (#25200)

* switch param

* add to ui

* fix that

* fetch for new branch

Co-authored-by: Comma Device <device@comma.ai> 
selfdrive/ui/qt/offroad/settings.cc