Toyota Stock Lon Mode - 2025-06-16

This commit is contained in:
Rick Lan
2025-04-01 12:18:17 +08:00
parent b31452416f
commit 07461e4b20
6 changed files with 15 additions and 0 deletions
+1
View File
@@ -144,4 +144,5 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
{"dp_device_auto_shutdown_in", PERSISTENT},
{"dp_ui_radar_tracks", PERSISTENT},
{"dp_device_ip", CLEAR_ON_MANAGER_START},
{"dp_toyota_stock_lon", PERSISTENT},
};
+1
View File
@@ -22,4 +22,5 @@ CarParamsT = capnp.lib.capnp._StructModule
class DPFlags:
LateralALKA = 1
ExtRadar = 2
ToyotaStockLon = 2 ** 2
pass
@@ -131,6 +131,10 @@ class CarInterface(CarInterfaceBase):
candidate in (TSS2_CAR - RADAR_ACC_CAR) or \
bool(ret.flags & ToyotaFlags.DISABLE_RADAR.value)
if dp_params & structs.DPFlags.ToyotaStockLon:
ret.openpilotLongitudinalControl = False
ret.alphaLongitudinalAvailable = False
ret.autoResumeSng = ret.openpilotLongitudinalControl and candidate in NO_STOP_TIMER_CAR
if not ret.openpilotLongitudinalControl:
+3
View File
@@ -105,6 +105,9 @@ class Car:
if self.params.get_bool("dp_lat_alka"):
dp_params |= structs.DPFlags.LateralALKA
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), alpha_long_allowed, is_release, num_pandas, dp_params, cached_params)
self.RI = interfaces[self.CI.CP.carFingerprint].RadarInterface(self.CI.CP)
self.CP = self.CI.CP
+5
View File
@@ -7,6 +7,11 @@ void DPPanel::add_toyota_toggles() {
QString::fromUtf8("🐉 ") + tr("Toyota / Lexus"),
"",
},
{
"dp_toyota_stock_lon",
tr("Use Stock Longitudinal Control"),
"",
},
};
QWidget *label = nullptr;
+1
View File
@@ -61,6 +61,7 @@ def manager_init() -> None:
("dp_lon_no_gas_gating", "0"),
("dp_device_auto_shutdown_in", "-5"),
("dp_ui_radar_tracks", "0"),
("dp_toyota_stock_lon", "0"),
]
if params.get_bool("RecordFrontLock"):