mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-19 18:13:57 +08:00
Merge branch 'brand/toyota/stock-lon' into pre-toyota
This commit is contained in:
@@ -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},
|
||||
};
|
||||
|
||||
@@ -24,4 +24,5 @@ class DPFlags:
|
||||
ExtRadar = 2
|
||||
ToyotaDoorAutoLockUnlock = 2 ** 2
|
||||
ToyotaTSS1SnG = 2 ** 3
|
||||
ToyotaStockLon = 2 ** 4
|
||||
pass
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user