diff --git a/common/params.cc b/common/params.cc index eb38f4e..bdd215a 100644 --- a/common/params.cc +++ b/common/params.cc @@ -401,6 +401,7 @@ std::unordered_map keys = { {"SLCPriority2", PERSISTENT}, {"SLCPriority3", PERSISTENT}, {"SmoothBraking", PERSISTENT}, + {"SNGHack", PERSISTENT}, {"SpeedLimitController", PERSISTENT}, {"SpeedLimitChangedAlert", PERSISTENT}, {"StandardFollow", PERSISTENT}, diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 9ebf54e..4e5665a 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -173,7 +173,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 frogpilot_variables.sng_hack: self.standstill_req = True if CS.pcm_acc_status != 8: # pcm entered standstill or it's disabled diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 67e1fbc..6b4fd58 100644 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -1208,6 +1208,7 @@ class Controls: self.lane_detection_width = self.params.get_int("LaneDetectionWidth") * (1 if self.is_metric else CV.FOOT_TO_METER) / 10 if self.lane_detection else 0 self.frogpilot_variables.personalities_via_wheel = self.params.get_bool("PersonalitiesViaWheel") and self.params.get_bool("AdjustablePersonalities") + self.frogpilot_variables.sng_hack = self.params.get_bool("SNGHack") quality_of_life = self.params.get_bool("QOLControls") self.pause_lateral_on_signal = self.params.get_int("PauseLateralOnSignal") * (CV.KPH_TO_MS if self.is_metric else CV.MPH_TO_MS) if quality_of_life else 0 diff --git a/selfdrive/frogpilot/ui/vehicle_settings.cc b/selfdrive/frogpilot/ui/vehicle_settings.cc index 5860166..fb1ec07 100644 --- a/selfdrive/frogpilot/ui/vehicle_settings.cc +++ b/selfdrive/frogpilot/ui/vehicle_settings.cc @@ -118,6 +118,7 @@ FrogPilotVehiclesPanel::FrogPilotVehiclesPanel(SettingsWindow *parent) : FrogPil {"LockDoors", "Lock Doors In Drive", "Automatically lock the doors when in drive and unlock when in park.", ""}, {"LongitudinalTune", "Longitudinal Tune", "Use a custom Toyota longitudinal tune.\n\nCydia = More focused on TSS-P vehicles but works for all Toyotas\n\nDragonPilot = Focused on TSS2 vehicles\n\nFrogPilot = Takes the best of both worlds with some personal tweaks focused around my 2019 Lexus ES 350", ""}, + {"SNGHack", "Stop and Go Hack", "Enable the 'Stop and Go' hack for vehicles without stock stop and go functionality.", ""}, }; for (const auto &[param, title, desc, icon] : vehicleToggles) { diff --git a/selfdrive/frogpilot/ui/vehicle_settings.h b/selfdrive/frogpilot/ui/vehicle_settings.h index 873a7d6..980f817 100644 --- a/selfdrive/frogpilot/ui/vehicle_settings.h +++ b/selfdrive/frogpilot/ui/vehicle_settings.h @@ -30,7 +30,7 @@ private: std::set gmKeys = {"GasRegenCmd", "LongPitch", "LowerVolt"}; std::set subaruKeys = {"CrosstrekTorque"}; - std::set toyotaKeys = {"LockDoors", "LongitudinalTune"}; + std::set toyotaKeys = {"LockDoors", "LongitudinalTune", "SNGHack"}; Params params; Params paramsMemory{"/dev/shm/params"};