forked from IQ.Lvbs/IQ.Pilot
IQ.Pilot Release Commit @ f2a861c
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
|
||||
"""
|
||||
@@ -1,27 +1,18 @@
|
||||
"""
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
|
||||
"""
|
||||
from cereal import log
|
||||
from iqpilot.cereal import log
|
||||
from iqdbc.car import structs
|
||||
from iqdbc.car.chrysler.values import RAM_DT
|
||||
from openpilot.selfdrive.selfdrived.events import Events
|
||||
from openpilot.iqpilot.selfdrive.selfdrived.events import IQEvents
|
||||
from iqpilot.selfdrive.selfdrived.events import Events
|
||||
from iqpilot.selfdrive.selfdrived.iq_events import IQEvents
|
||||
|
||||
_E = log.OnroadEvent.EventName
|
||||
_GEAR = structs.CarState.GearShifter
|
||||
|
||||
# RAM_DT trucks with an enable floor at/above this need the gear-gated steer-floor latch
|
||||
_RAM_STEER_FLOOR_MS = 14.5
|
||||
|
||||
|
||||
class VehicleEvents:
|
||||
"""Brand-specific corrections layered onto the generic onroad event set.
|
||||
|
||||
openpilot's shared event path doesn't cover a couple of platform quirks: RAM_DT owns its
|
||||
own low-speed steering floor, and a gas-interceptor Toyota can creep off a stop without the
|
||||
stock resume prompt. Each supported brand gets a small handler that edits the live event set.
|
||||
"""
|
||||
|
||||
def __init__(self, CP: structs.CarParams, CP_IQ: structs.IQCarParams):
|
||||
self.CP = CP
|
||||
self.CP_IQ = CP_IQ
|
||||
@@ -35,9 +26,6 @@ class VehicleEvents:
|
||||
|
||||
def _ram_steer_floor(self, CS: structs.CarState, events: Events) -> None:
|
||||
if self.CP.carFingerprint in RAM_DT:
|
||||
# RAM_DT drives its own steer floor, so drop openpilot's generic alert and latch ours instead.
|
||||
# Two independent gates on purpose: clearing above the enable floor, then re-latching when
|
||||
# parked out of Drive — the latch wins when both hold at once.
|
||||
events.remove(_E.belowSteerSpeed)
|
||||
if CS.vEgo >= self.CP.minEnableSpeed:
|
||||
self._steer_floor_held = False
|
||||
|
||||
Reference in New Issue
Block a user