IQ.Pilot Release Commit @ fddcfba

This commit is contained in:
IQ.Lvbs CI [bot]
2026-07-21 13:46:05 -05:00
parent eea1278105
commit b6c0232c12
667 changed files with 3218 additions and 1780 deletions

View File

@@ -102,7 +102,7 @@ class VehicleLayoutMici(NavScroller):
def _vw_flags(self):
try:
from opendbc.car.volkswagen.values import CAR
from iqdbc.car.volkswagen.values import CAR
bundle = ui_state.params.get("CarPlatformBundle")
if bundle and (platform := bundle.get("platform")):
return CAR[platform].config.flags
@@ -113,16 +113,16 @@ class VehicleLayoutMici(NavScroller):
return 0
def _is_vw_pq(self) -> bool:
from opendbc.car.volkswagen.values import VolkswagenFlags
from iqdbc.car.volkswagen.values import VolkswagenFlags
return bool(self._vw_flags() & VolkswagenFlags.PQ)
def _is_vw_mqb(self) -> bool:
from opendbc.car.volkswagen.values import VolkswagenFlags
from iqdbc.car.volkswagen.values import VolkswagenFlags
flags = self._vw_flags()
return not bool(flags & (VolkswagenFlags.PQ | VolkswagenFlags.MLB | VolkswagenFlags.MEB | VolkswagenFlags.MEB_GEN2 | VolkswagenFlags.MQB_EVO))
def _supports_vw_lateral_when_faulted(self) -> bool:
from opendbc.car.volkswagen.values import VolkswagenFlags
from iqdbc.car.volkswagen.values import VolkswagenFlags
# PQ, MEB, MQB_EVO and base MQB all implement cruiseFaultLateralMode in carstate.py.
# MLB does not.
return not bool(self._vw_flags() & VolkswagenFlags.MLB)

View File

@@ -76,7 +76,9 @@ class IQUIState:
@property
def onroad_brightness_timer_expired(self) -> bool:
return self.onroad_brightness != OnroadBrightness.AUTO and self.onroad_brightness_timer == 0
if self.onroad_brightness == OnroadBrightness.AUTO:
return False
return self.onroad_brightness_timer == 0
@property
def auto_onroad_brightness(self) -> bool:
@@ -208,18 +210,20 @@ class IQDevice:
@staticmethod
def set_min_onroad_brightness(_ui_state, min_brightness: int) -> int:
if _ui_state.onroad_brightness == OnroadBrightness.AUTO_DARK:
min_brightness = 10
return min_brightness
dark = _ui_state.onroad_brightness == OnroadBrightness.AUTO_DARK
return 10 if dark else min_brightness
@staticmethod
def wake_from_dimmed_onroad_brightness(_ui_state, evs) -> None:
if _ui_state.started and (_ui_state.onroad_brightness_timer_expired or _ui_state.onroad_brightness == OnroadBrightness.AUTO_DARK):
if any(ev.left_down for ev in evs):
if _ui_state.onroad_brightness_timer_expired:
gui_app.mouse_events.clear()
_ui_state.reset_onroad_sleep_timer()
expired = _ui_state.onroad_brightness_timer_expired
dimmed = expired or _ui_state.onroad_brightness == OnroadBrightness.AUTO_DARK
if not (_ui_state.started and dimmed):
return
if not any(ev.left_down for ev in evs):
return
if expired:
gui_app.mouse_events.clear()
_ui_state.reset_onroad_sleep_timer()
class UIStatus(Enum):