IQ.Pilot Release Commit @ bec7652

This commit is contained in:
IQ.Lvbs history cleanup
2026-08-22 23:42:41 -05:00
commit 58039e647c
4603 changed files with 1236178 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
"""
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
"""

View File

@@ -0,0 +1,47 @@
"""
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
"""
from iqpilot.cereal import log
from iqdbc.car import structs
from iqdbc.car.chrysler.values import RAM_DT
from iqpilot.selfdrive.selfdrived.events import Events
from iqpilot.selfdrive.selfdrived.iq_events import IQEvents
_E = log.OnroadEvent.EventName
_GEAR = structs.CarState.GearShifter
_RAM_STEER_FLOOR_MS = 14.5
class VehicleEvents:
def __init__(self, CP: structs.CarParams, CP_IQ: structs.IQCarParams):
self.CP = CP
self.CP_IQ = CP_IQ
self._steer_floor_held = False
def update(self, CS: structs.CarState, events: Events) -> IQEvents:
handler = self._BRAND_HANDLERS.get(self.CP.brand)
if handler is not None:
handler(self, CS, events)
return IQEvents()
def _ram_steer_floor(self, CS: structs.CarState, events: Events) -> None:
if self.CP.carFingerprint in RAM_DT:
events.remove(_E.belowSteerSpeed)
if CS.vEgo >= self.CP.minEnableSpeed:
self._steer_floor_held = False
if self.CP.minEnableSpeed >= _RAM_STEER_FLOOR_MS and CS.gearShifter != _GEAR.drive:
self._steer_floor_held = True
if self._steer_floor_held:
events.add(_E.belowSteerSpeed)
def _toyota_interceptor_resume(self, CS: structs.CarState, events: Events) -> None:
if not self.CP.openpilotLongitudinalControl:
return
stopped_and_coasting = CS.cruiseState.standstill and not CS.brakePressed
if stopped_and_coasting and self.CP_IQ.enableGasInterceptor:
events.remove(_E.resumeRequired)
_BRAND_HANDLERS = {
'chrysler': _ram_steer_floor,
'toyota': _toyota_interceptor_resume,
}