Merge branch 'brand/toyota/stock-lon' into pre-toyota

This commit is contained in:
Rick Lan
2025-05-27 15:36:13 +08:00
6 changed files with 15 additions and 0 deletions

View File

@@ -142,4 +142,5 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
{"dp_ui_radar_tracks", PERSISTENT},
{"dp_toyota_door_auto_lock_unlock", PERSISTENT},
{"dp_toyota_tss1_sng", PERSISTENT},
{"dp_toyota_stock_lon", PERSISTENT},
};

View File

@@ -24,4 +24,5 @@ class DPFlags:
ExtRadar = 2
ToyotaDoorAutoLockUnlock = 2 ** 2
ToyotaTSS1SnG = 2 ** 3
ToyotaStockLon = 2 ** 4
pass

View File

@@ -165,6 +165,10 @@ class CarInterface(CarInterfaceBase):
bool(ret.flags & ToyotaFlags.DISABLE_RADAR.value) or \
sdsu_active
if dp_params & structs.DPFlags.ToyotaStockLon:
ret.openpilotLongitudinalControl = False
ret.experimentalLongitudinalAvailable = False
ret.autoResumeSng = ret.openpilotLongitudinalControl and candidate in NO_STOP_TIMER_CAR
if not ret.openpilotLongitudinalControl:

View File

@@ -108,6 +108,9 @@ class Car:
if self.params.get_bool("dp_toyota_tss1_sng"):
dp_params |= structs.DPFlags.ToyotaTSS1SnG
if self.params.get_bool("dp_toyota_stock_lon"):
dp_params |= structs.DPFlags.ToyotaStockLon
self.CI = get_car(*self.can_callbacks, obd_callback(self.params), experimental_long_allowed, num_pandas, dp_params, cached_params)
self.RI = interfaces[self.CI.CP.carFingerprint].RadarInterface(self.CI.CP)
self.CP = self.CI.CP

View File

@@ -17,6 +17,11 @@ void DPPanel::add_toyota_toggles() {
tr("Enable TSS1 SnG Mod"),
"",
},
{
"dp_toyota_stock_lon",
tr("Use Stock Longitudinal Control"),
"",
},
};
QWidget *label = nullptr;

View File

@@ -64,6 +64,7 @@ def manager_init() -> None:
("dp_ui_radar_tracks", "0"),
("dp_toyota_door_auto_lock_unlock", "0"),
("dp_toyota_tss1_sng", "0"),
("dp_toyota_stock_lon", "0"),
]
if params.get_bool("RecordFrontLock"):