mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-23 06:52:07 +08:00
Toyota TSS1 SnG - init
This commit is contained in:
@@ -140,4 +140,5 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"dp_lon_no_gas_gating", PERSISTENT},
|
||||
{"dp_device_auto_shutdown_in", PERSISTENT},
|
||||
{"dp_ui_radar_tracks", PERSISTENT},
|
||||
{"dp_toyota_tss1_sng", PERSISTENT},
|
||||
};
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -102,6 +102,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), 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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -62,6 +62,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"):
|
||||
|
||||
Reference in New Issue
Block a user