Toyota TSS1 SnG - init

This commit is contained in:
Rick Lan
2025-03-31 13:37:45 +08:00
parent b31452416f
commit fd4c6d6069
8 changed files with 18 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_tss1_sng", PERSISTENT},
};
+1
View File
@@ -22,4 +22,5 @@ CarParamsT = capnp.lib.capnp._StructModule
class DPFlags:
LateralALKA = 1
ExtRadar = 2
ToyotaTSS1SnG = 2 ** 2
pass
@@ -172,6 +172,9 @@ class CarController(CarControllerBase):
# pcm entered standstill or it's disabled
self.standstill_req = False
if (self.CP.flags & ToyotaFlags.TSS1_SNG.value) and CS.out.standstill and not self.last_standstill:
self.standstill_req = False
self.last_standstill = CS.out.standstill
# handle UI messages
@@ -151,6 +151,9 @@ class CarInterface(CarInterfaceBase):
if ret.flags & ToyotaFlags.HYBRID.value:
ret.longitudinalActuatorDelay = 0.05
if dp_params & structs.DPFlags.ToyotaTSS1SnG:
ret.flags |= ToyotaFlags.TSS1_SNG.value
return ret
@staticmethod
@@ -77,6 +77,7 @@ class ToyotaFlags(IntFlag):
SECOC = 2048
ALKA = 2 ** 12
TSS1_SNG = 2 ** 13
class Footnote(Enum):
CAMRY = CarFootnote(
+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_tss1_sng"):
dp_params |= structs.DPFlags.ToyotaTSS1SnG
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_tss1_sng",
tr("Enable TSS1 SnG Mod"),
"",
},
};
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_tss1_sng", "0"),
]
if params.get_bool("RecordFrontLock"):