diff --git a/opendbc_repo b/opendbc_repo index ad06564a6b..9fd36c6d66 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit ad06564a6b107ba88fe7ef0bf7683abac75ef0ea +Subproject commit 9fd36c6d663e5c46d1d0e2c327bb9e34107aced7 diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.cc index d6c8ed5fca..291a334f5a 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.cc @@ -30,10 +30,10 @@ VehiclePanel::VehiclePanel(QWidget *parent) : QFrame(parent) { platformSelector = new PlatformSelector(); list->addItem(platformSelector); - // Use updateUI() on offroad transition. QObject::connect(uiState(), &UIState::offroadTransition, this, [=](bool offroad_transition) { offroad = offroad_transition; - updateUI(); + updatePanel(offroad); + updateCarToggles(); }); ScrollViewSP *scroller = new ScrollViewSP(list, this); @@ -70,14 +70,10 @@ VehiclePanel::VehiclePanel(QWidget *parent) : QFrame(parent) { main_layout->addWidget(vehicleScreen); } -void VehiclePanel::updateUI() { - updatePanel(offroad); - updateCarToggles(); -} - void VehiclePanel::showEvent(QShowEvent *event) { QFrame::showEvent(event); - updateUI(); + updatePanel(offroad); + updateCarToggles(); } void VehiclePanel::updatePanel(bool _offroad) { diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.h b/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.h index cf4cf2526a..ab898b3322 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.h +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_panel.h @@ -33,6 +33,5 @@ private: int hkg_state = 0; private slots: - void updateUI(); void updateCarToggles(); }; diff --git a/sunnypilot/selfdrive/car/interfaces.py b/sunnypilot/selfdrive/car/interfaces.py index 246d29e79f..6136e69ba4 100644 --- a/sunnypilot/selfdrive/car/interfaces.py +++ b/sunnypilot/selfdrive/car/interfaces.py @@ -50,13 +50,12 @@ def setup_car_interface_sp(CP: structs.CarParams, CP_SP: structs.CarParamsSP, pa if params is None: params = Params() - if CP.brand == 'hyundai': - tuning_option_str = params.get("HyundaiLongTune") - if tuning_option_str is not None: - tuning_option_str = tuning_option_str.strip() - if tuning_option_str != "0": - CP_SP.flags |= HyundaiFlagsSP.HKGLONGTUNING.value - if params.get_bool("HyundaiSmootherBraking"): + tuning_option_str = params.get("HyundaiLongTune") + if tuning_option_str is not None: + tuning_option_str = tuning_option_str.strip() + if tuning_option_str != "0": + CP_SP.flags |= HyundaiFlagsSP.HKGLONGTUNING.value + if params.get_bool("HyundaiSmootherBraking"): CP_SP.flags |= HyundaiFlagsSP.HKGLONGTUNING_BRAKING.value if CP.brand == 'hyundai':