Merge branch 'brand/toyota/tss1-sng' into pre-toyota

This commit is contained in:
Rick Lan
2025-05-27 15:33:27 +08:00
8 changed files with 18 additions and 0 deletions
+1
View File
@@ -141,4 +141,5 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
{"dp_device_auto_shutdown_in", PERSISTENT},
{"dp_ui_radar_tracks", PERSISTENT},
{"dp_toyota_door_auto_lock_unlock", PERSISTENT},
{"dp_toyota_tss1_sng", PERSISTENT},
};
+1
View File
@@ -23,4 +23,5 @@ class DPFlags:
LateralALKA = 1
ExtRadar = 2
ToyotaDoorAutoLockUnlock = 2 ** 2
ToyotaTSS1SnG = 2 ** 3
pass
@@ -185,6 +185,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
@@ -154,6 +154,9 @@ class CarInterface(CarInterfaceBase):
if dp_params & structs.DPFlags.ToyotaDoorAutoLockUnlock:
ret.flags |= ToyotaFlags.DOOR_AUTO_LOCK_UNLOCK.value
if dp_params & structs.DPFlags.ToyotaTSS1SnG:
ret.flags |= ToyotaFlags.TSS1_SNG.value
return ret
@staticmethod
@@ -78,6 +78,7 @@ class ToyotaFlags(IntFlag):
ALKA = 2 ** 12
DOOR_AUTO_LOCK_UNLOCK = 2 ** 13
TSS1_SNG = 2 ** 14
class Footnote(Enum):
CAMRY = CarFootnote(
+3
View File
@@ -105,6 +105,9 @@ class Car:
if self.params.get_bool("dp_toyota_door_auto_lock_unlock"):
dp_params |= structs.DPFlags.ToyotaDoorAutoLockUnlock
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), 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
+5
View File
@@ -12,6 +12,11 @@ void DPPanel::add_toyota_toggles() {
tr("Enable Door Auto Lock/Unlock"),
"",
},
{
"dp_toyota_tss1_sng",
tr("Enable TSS1 SnG Mod"),
"",
},
};
QWidget *label = nullptr;
+1
View File
@@ -63,6 +63,7 @@ def manager_init() -> None:
("dp_device_auto_shutdown_in", "-5"),
("dp_ui_radar_tracks", "0"),
("dp_toyota_door_auto_lock_unlock", "0"),
("dp_toyota_tss1_sng", "0"),
]
if params.get_bool("RecordFrontLock"):