SNG hack
Added toggle to force stop and go for Toyota vehicles.
This commit is contained in:
@@ -317,6 +317,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
|||||||
{"Sidebar", PERSISTENT},
|
{"Sidebar", PERSISTENT},
|
||||||
{"SilentMode", PERSISTENT},
|
{"SilentMode", PERSISTENT},
|
||||||
{"SmoothBraking", PERSISTENT},
|
{"SmoothBraking", PERSISTENT},
|
||||||
|
{"SNGHack", PERSISTENT},
|
||||||
{"StandardFollow", PERSISTENT},
|
{"StandardFollow", PERSISTENT},
|
||||||
{"StandardJerk", PERSISTENT},
|
{"StandardJerk", PERSISTENT},
|
||||||
{"StoppingDistance", PERSISTENT},
|
{"StoppingDistance", PERSISTENT},
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class CarController:
|
|||||||
# FrogPilot variables
|
# FrogPilot variables
|
||||||
self.lock_doors = False
|
self.lock_doors = False
|
||||||
self.reverse_cruise_increase = False
|
self.reverse_cruise_increase = False
|
||||||
|
self.sng_hack = False
|
||||||
|
|
||||||
self.doors_locked = False
|
self.doors_locked = False
|
||||||
self.doors_unlocked = True
|
self.doors_unlocked = True
|
||||||
@@ -56,6 +57,7 @@ class CarController:
|
|||||||
def update_frogpilot_variables(self, params):
|
def update_frogpilot_variables(self, params):
|
||||||
self.lock_doors = params.get_bool("LockDoors")
|
self.lock_doors = params.get_bool("LockDoors")
|
||||||
self.reverse_cruise_increase = params.get_bool("ReverseCruise")
|
self.reverse_cruise_increase = params.get_bool("ReverseCruise")
|
||||||
|
self.sng_hack = params.get_bool("SNGHack")
|
||||||
|
|
||||||
def update(self, CC, CS, now_nanos, sport_plus):
|
def update(self, CC, CS, now_nanos, sport_plus):
|
||||||
actuators = CC.actuators
|
actuators = CC.actuators
|
||||||
@@ -141,7 +143,7 @@ class CarController:
|
|||||||
pcm_cancel_cmd = 1
|
pcm_cancel_cmd = 1
|
||||||
|
|
||||||
# on entering standstill, send standstill request
|
# 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
|
self.standstill_req = True
|
||||||
if CS.pcm_acc_status != 8:
|
if CS.pcm_acc_status != 8:
|
||||||
# pcm entered standstill or it's disabled
|
# pcm entered standstill or it's disabled
|
||||||
|
|||||||
@@ -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.", ""},
|
{"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.", ""},
|
{"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) {
|
for (auto &[param, title, desc, icon] : vehicleToggles) {
|
||||||
|
|||||||
Reference in New Issue
Block a user