diff --git a/common/params.cc b/common/params.cc index 5ac659c..e79a79a 100644 --- a/common/params.cc +++ b/common/params.cc @@ -317,6 +317,7 @@ std::unordered_map keys = { {"Sidebar", PERSISTENT}, {"SilentMode", PERSISTENT}, {"SmoothBraking", PERSISTENT}, + {"SNGHack", PERSISTENT}, {"StandardFollow", PERSISTENT}, {"StandardJerk", PERSISTENT}, {"StoppingDistance", PERSISTENT}, diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index bd40ec9..031320a 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -49,6 +49,7 @@ class CarController: # FrogPilot variables self.lock_doors = False self.reverse_cruise_increase = False + self.sng_hack = False self.doors_locked = False self.doors_unlocked = True @@ -56,6 +57,7 @@ class CarController: def update_frogpilot_variables(self, params): self.lock_doors = params.get_bool("LockDoors") self.reverse_cruise_increase = params.get_bool("ReverseCruise") + self.sng_hack = params.get_bool("SNGHack") def update(self, CC, CS, now_nanos, sport_plus): actuators = CC.actuators @@ -141,7 +143,7 @@ class CarController: pcm_cancel_cmd = 1 # on entering standstill, send standstill request - if CS.out.standstill and not self.last_standstill and (self.CP.carFingerprint not in NO_STOP_TIMER_CAR or self.CP.enableGasInterceptor): + if CS.out.standstill and not self.last_standstill and (self.CP.carFingerprint not in NO_STOP_TIMER_CAR or self.CP.enableGasInterceptor) and not self.sng_hack: self.standstill_req = True if CS.pcm_acc_status != 8: # pcm entered standstill or it's disabled diff --git a/selfdrive/frogpilot/ui/vehicle_settings.cc b/selfdrive/frogpilot/ui/vehicle_settings.cc index 5b08c2f..63e8c81 100644 --- a/selfdrive/frogpilot/ui/vehicle_settings.cc +++ b/selfdrive/frogpilot/ui/vehicle_settings.cc @@ -104,6 +104,7 @@ FrogPilotVehiclesPanel::FrogPilotVehiclesPanel(SettingsWindow *parent) : FrogPil {"LowerVolt", "Lower Volt Enable Speed", "Lower the Volt's minimum enable speed to enable openpilot at any speed.", ""}, {"LockDoors", "Lock Doors In Drive", "Automatically lock the doors when in drive and unlock when in park.", ""}, + {"SNGHack", "Stop and Go Hack", "Enable the 'Stop and Go' hack for vehicles without stock stop and go functionality.", ""}, }; for (auto &[param, title, desc, icon] : vehicleToggles) {