Added toggle to force stop and go for Toyota vehicles.
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent 830077af74
commit 6fa4b545a8
3 changed files with 5 additions and 1 deletions

View File

@@ -317,6 +317,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"Sidebar", PERSISTENT},
{"SilentMode", PERSISTENT},
{"SmoothBraking", PERSISTENT},
{"SNGHack", PERSISTENT},
{"StandardFollow", PERSISTENT},
{"StandardJerk", PERSISTENT},
{"StoppingDistance", PERSISTENT},

View File

@@ -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

View File

@@ -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) {