mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-23 16:32:04 +08:00
Attach to dynamic experimental controller
This commit is contained in:
@@ -148,9 +148,6 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"QuietMode", PERSISTENT | BACKUP},
|
||||
{"ShowAdvancedControls", PERSISTENT | BACKUP},
|
||||
|
||||
// Blend acc to e2e transition
|
||||
{"BlendAccToE2ETransition", PERSISTENT | BACKUP},
|
||||
|
||||
// MADS params
|
||||
{"Mads", PERSISTENT | BACKUP},
|
||||
{"MadsMainCruiseAllowed", PERSISTENT | BACKUP},
|
||||
|
||||
@@ -23,15 +23,6 @@ LongitudinalPanel::LongitudinalPanel(QWidget *parent) : QWidget(parent) {
|
||||
|
||||
QObject::connect(uiState(), &UIState::offroadTransition, this, &LongitudinalPanel::refresh);
|
||||
|
||||
// chill to experimental transition control
|
||||
accToE2ETransitionControl = new ParamControlSP("BlendAccToE2ETransition",
|
||||
tr("Blend chill to experimental mode transition"),
|
||||
tr("Enable to blend braking desires when switching from chill to experimental in a smoother, more natural way. "
|
||||
"This allows for a gradual transition when switching from ACC to E2E longitudinal control."),
|
||||
"../assets/offroad/icon_shell.png", nullptr, true);
|
||||
accToE2ETransitionControl->showDescription();
|
||||
list->addItem(accToE2ETransitionControl);
|
||||
|
||||
main_layout->addWidget(cruisePanelScreen);
|
||||
main_layout->setCurrentWidget(cruisePanelScreen);
|
||||
refresh(offroad);
|
||||
|
||||
@@ -29,6 +29,4 @@ private:
|
||||
ScrollViewSP *cruisePanelScroller = nullptr;
|
||||
QWidget *cruisePanelScreen = nullptr;
|
||||
CustomAccIncrement *customAccIncrement = nullptr;
|
||||
|
||||
ParamControlSP *accToE2ETransitionControl;
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ class LongitudinalPlannerSP:
|
||||
self._last_mode = mode
|
||||
|
||||
def blend_accel_transition(self, mpc_accel: float, e2e_accel: float, v_ego: float) -> float:
|
||||
if self._params.get_bool("BlendAccToE2ETransition"):
|
||||
if self._params.get_bool("DynamicExperimentalControl"):
|
||||
if self._transition_counter < self._transition_steps:
|
||||
self._transition_counter += 1
|
||||
progress = self._transition_counter / self._transition_steps
|
||||
|
||||
@@ -47,7 +47,6 @@ def manager_init() -> None:
|
||||
sunnypilot_default_params: list[tuple[str, str | bytes]] = [
|
||||
("AutoLaneChangeTimer", "0"),
|
||||
("AutoLaneChangeBsmDelay", "0"),
|
||||
("BlendAccToE2ETransition", "0"),
|
||||
("BlindSpot", "0"),
|
||||
("BlinkerMinLateralControlSpeed", "20"), # MPH or km/h
|
||||
("BlinkerPauseLateralControl", "0"),
|
||||
|
||||
Reference in New Issue
Block a user