IQ.Pilot Release Commit @ f82ff4d
This commit is contained in:
@@ -291,7 +291,7 @@ def _iter_repo_roots() -> list[Path]:
|
||||
if parent in seen:
|
||||
continue
|
||||
|
||||
if (parent / "konn3kt_private").exists() or (parent / "iqpilot" / "models_private_src").exists() or (parent / "opendbc_repo").exists():
|
||||
if (parent / "konn3kt_private").exists() or (parent / "iqpilot" / "models_private_src").exists() or (parent / "iqdbc_repo").exists():
|
||||
roots.append(parent)
|
||||
seen.add(parent)
|
||||
|
||||
|
||||
@@ -214,9 +214,10 @@ class NoEntryCard(AlertCard):
|
||||
def __init__(self,
|
||||
alert_text_2: str,
|
||||
alert_text_1: str = "openpilot Unavailable",
|
||||
visual_alert: car.CarControl.HUDControl.VisualAlert = VisualAlert.none):
|
||||
visual_alert: car.CarControl.HUDControl.VisualAlert = VisualAlert.none,
|
||||
priority: Tier = Tier.LOW):
|
||||
primary, secondary, size = _mici_reframe(alert_text_1, alert_text_2)
|
||||
super().__init__(primary, secondary, AlertStatus.normal, size, Tier.LOW, visual_alert, AudibleAlert.refuse, 3.0)
|
||||
super().__init__(primary, secondary, AlertStatus.normal, size, priority, visual_alert, AudibleAlert.refuse, 3.0)
|
||||
|
||||
|
||||
class GentleDisableCard(AlertCard):
|
||||
|
||||
@@ -8,12 +8,12 @@ from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
from openpilot.common.params import Params, UnknownKeyName
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from opendbc.safety import ALTERNATIVE_EXPERIENCE
|
||||
from iqdbc.safety import ALTERNATIVE_EXPERIENCE
|
||||
from openpilot.selfdrive.selfdrived.events import ET
|
||||
from opendbc.car.hyundai.values import HyundaiFlags
|
||||
from opendbc.iqpilot.car.hyundai.values import HyundaiFlagsIQ, HyundaiSafetyFlagsIQ
|
||||
from iqdbc.car.hyundai.values import HyundaiFlags
|
||||
from iqdbc.iqpilot.car.hyundai.values import HyundaiFlagsIQ, HyundaiSafetyFlagsIQ
|
||||
from openpilot.selfdrive.selfdrived.state import SOFT_DISABLE_TIME
|
||||
from cereal import log, custom
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed
|
||||
from types import SimpleNamespace
|
||||
|
||||
from cereal import custom
|
||||
from opendbc.car import structs
|
||||
from opendbc.car.hyundai.values import HyundaiFlags
|
||||
from iqdbc.car import structs
|
||||
from iqdbc.car.hyundai.values import HyundaiFlags
|
||||
from openpilot.iqpilot.sab.behavior import SteeringAssistanceBehavior
|
||||
from openpilot.iqpilot.selfdrive.selfdrived.events import IQEvents
|
||||
from openpilot.selfdrive.selfdrived.events import Events
|
||||
|
||||
@@ -6,7 +6,7 @@ from __future__ import annotations
|
||||
from openpilot.common.constants import CV
|
||||
from openpilot.selfdrive.car.cruise import V_CRUISE_MAX
|
||||
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
|
||||
ENHANCED_STOCK_LONGITUDINAL_CONTROL_SET_SPEED_KPH_KEY = "enhancedStockLongitudinalControl.setSpeedKph"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ long enough toggles Experimental mode exactly once per hold. Only active when
|
||||
IQ.Pilot owns longitudinal control and cruise is available.
|
||||
"""
|
||||
from cereal import car, custom
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
from openpilot.common.params import Params
|
||||
|
||||
_Button = car.CarState.ButtonEvent.Type
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
|
||||
"""
|
||||
from opendbc.car import structs as _dbc
|
||||
from iqdbc.car import structs as _dbc
|
||||
from openpilot.common.params import Params as _Store
|
||||
from openpilot.common.swaglog import cloudlog as _log
|
||||
from openpilot.selfdrive.controls.lib.latcontrol_torque import get_nn_model_path as _resolve_nn
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from cereal import custom
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
|
||||
from openpilot.iqpilot.selfdrive.car.interfaces import _cleanup_unsupported_params
|
||||
|
||||
|
||||
@@ -81,5 +81,5 @@ def _write(vehicles: dict[str, dict], basedir: str = BASEDIR) -> str:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from opendbc.iqpilot.car.platform_list import get_car_list
|
||||
from iqdbc.iqpilot.car.platform_list import get_car_list
|
||||
print("wrote", _write(get_car_list()))
|
||||
|
||||
@@ -10,7 +10,7 @@ import time
|
||||
import cereal.messaging as messaging
|
||||
from cereal import log, custom
|
||||
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
from openpilot.common.constants import CV
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.swaglog import cloudlog
|
||||
|
||||
@@ -24,7 +24,7 @@ Two mechanisms share the param:
|
||||
"""
|
||||
import numpy as np
|
||||
|
||||
from opendbc.car.interfaces import ACCEL_MIN
|
||||
from iqdbc.car.interfaces import ACCEL_MIN
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import DT_MDL
|
||||
from openpilot.selfdrive.modeld.constants import ModelConstants
|
||||
|
||||
@@ -3,7 +3,7 @@ Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed
|
||||
"""
|
||||
from cereal import messaging
|
||||
from numpy import interp
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import DT_MDL
|
||||
from openpilot.iqpilot.selfdrive.controls.lib.iq_dynamic.imahelper import (
|
||||
|
||||
@@ -3,7 +3,7 @@ Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed
|
||||
|
||||
RadarManager — IQ.Dynamics side of "Blend IQ.Pilot + Stock ACC Radar" (VW PQ only).
|
||||
|
||||
Decides the high-level intent for the stock ACC radar and writes it onto iqCarControl for the opendbc
|
||||
Decides the high-level intent for the stock ACC radar and writes it onto iqCarControl for the iqdbc
|
||||
PQRadarHandler to execute on CAN. It does NOT touch CAN or read radar feedback directly: the handler
|
||||
(car process) owns the bus and the failure latch, and the carcontroller gates radar-accel passthrough
|
||||
on the live ACS_Sta_ADR. That keeps the desync guard automatic — if chill is requested but the radar
|
||||
@@ -34,7 +34,7 @@ class RadarManager:
|
||||
if getattr(CP, "brand", "") != "volkswagen":
|
||||
return False
|
||||
try:
|
||||
from opendbc.car.volkswagen.values import VolkswagenFlags
|
||||
from iqdbc.car.volkswagen.values import VolkswagenFlags
|
||||
return bool(CP.flags & VolkswagenFlags.PQ)
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
@@ -6,7 +6,7 @@ from datetime import datetime
|
||||
import numpy as np
|
||||
|
||||
from cereal import messaging, custom
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
from openpilot.common.constants import CV
|
||||
from openpilot.common.realtime import DT_MDL
|
||||
from openpilot.selfdrive.car.cruise import V_CRUISE_MAX
|
||||
|
||||
@@ -9,7 +9,7 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
from opendbc.car import structs
|
||||
from iqdbc.car import structs
|
||||
import openpilot.selfdrive.controls.lib.latcontrol_torque as locator
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed
|
||||
|
||||
Original concept and implementation by SpysyWeeb (github.com/SpysyWeeb)
|
||||
"""
|
||||
from opendbc.car.interfaces import ACCEL_MIN
|
||||
from iqdbc.car.interfaces import ACCEL_MIN
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Original concept ("Increased Stop Distance") by SpysyWeeb (github.com/SpysyWeeb)
|
||||
"""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from opendbc.car.interfaces import ACCEL_MIN
|
||||
from iqdbc.car.interfaces import ACCEL_MIN
|
||||
from openpilot.selfdrive.modeld.constants import ModelConstants
|
||||
from openpilot.iqpilot.selfdrive.controls.lib.custom_stop_distance import (
|
||||
CustomStopDistance,
|
||||
|
||||
@@ -11,7 +11,7 @@ import numpy as np
|
||||
from cereal import car, custom, log
|
||||
from cereal.messaging import PubMaster, SubMaster
|
||||
from msgq.visionipc import VisionBuf, VisionIpcClient, VisionStreamType
|
||||
from opendbc.car.car_helpers import get_demo_car_params
|
||||
from iqdbc.car.car_helpers import get_demo_car_params
|
||||
from setproctitle import setproctitle
|
||||
|
||||
from openpilot.common.filter_simple import FirstOrderFilter
|
||||
|
||||
@@ -186,7 +186,7 @@ _GUIDANCE_EVENTS: EVENTS_IQ_TYPE = {
|
||||
|
||||
EventNameIQ.modelTurnLeft: {
|
||||
ET.WARNING: Alert(
|
||||
"Turning Left",
|
||||
"Lane Turn Left",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 1.),
|
||||
@@ -194,7 +194,7 @@ _GUIDANCE_EVENTS: EVENTS_IQ_TYPE = {
|
||||
|
||||
EventNameIQ.modelTurnRight: {
|
||||
ET.WARNING: Alert(
|
||||
"Turning Right",
|
||||
"Lane Turn Right",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 1.),
|
||||
|
||||
@@ -13,7 +13,7 @@ from openpilot.system.ui.iqpilot.widgets.list_view import OptionControl
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
from openpilot.system.ui.widgets.network import NavButton
|
||||
from openpilot.system.ui.widgets.scroller_tici import Scroller
|
||||
from opendbc.car.volkswagen.values import CAR, VolkswagenFlags
|
||||
from iqdbc.car.volkswagen.values import CAR, VolkswagenFlags
|
||||
|
||||
|
||||
def _toggle_item(title: str, description: str, param: str) -> IQListItem:
|
||||
|
||||
@@ -92,9 +92,9 @@ from openpilot.selfdrive.ui.layouts.settings.device import DeviceLayout
|
||||
from openpilot.selfdrive.ui.layouts.settings.software import SoftwareLayout, time_ago
|
||||
|
||||
from functools import partial
|
||||
from opendbc.car.hyundai.values import CAR, CANFD_UNSUPPORTED_LONGITUDINAL_CAR, UNSUPPORTED_LONGITUDINAL_CAR
|
||||
from opendbc.car.subaru.values import CAR, SubaruFlags
|
||||
from opendbc.car.volkswagen.values import CAR, VolkswagenFlags
|
||||
from iqdbc.car.hyundai.values import CAR, CANFD_UNSUPPORTED_LONGITUDINAL_CAR, UNSUPPORTED_LONGITUDINAL_CAR
|
||||
from iqdbc.car.subaru.values import CAR, SubaruFlags
|
||||
from iqdbc.car.volkswagen.values import CAR, VolkswagenFlags
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.system.ui.iqpilot.lib.styles import ink
|
||||
from openpilot.system.ui.iqpilot.widgets.list_view import multiple_button_item
|
||||
@@ -1365,20 +1365,9 @@ class IQSoftwareLayout(SoftwareLayout):
|
||||
|
||||
# ===== device =====
|
||||
|
||||
offroad_time_options = {
|
||||
0: 0,
|
||||
1: 5,
|
||||
2: 10,
|
||||
3: 15,
|
||||
4: 30,
|
||||
5: 60,
|
||||
6: 120,
|
||||
7: 180,
|
||||
8: 300,
|
||||
9: 600,
|
||||
10: 1440,
|
||||
11: 1800,
|
||||
}
|
||||
# minutes the device may sit offroad before auto-shutdown, indexed by slider step
|
||||
_OFFROAD_SHUTDOWN_MINUTES = (0, 5, 10, 15, 30, 60, 120, 180, 300, 600, 1440, 1800)
|
||||
offroad_time_options = dict(enumerate(_OFFROAD_SHUTDOWN_MINUTES))
|
||||
|
||||
FORCE_ONROAD_DURATION_SEC = 10 * 60
|
||||
FORCE_ONROAD_PARAM = "ForceOnroadUntil"
|
||||
@@ -1398,20 +1387,8 @@ class IQDeviceLayout(DeviceLayout):
|
||||
DeviceLayout._initialize_items(self)
|
||||
|
||||
# Using dual button with no right button for better alignment
|
||||
self._always_offroad_btn = dual_button_item(
|
||||
left_text=lambda: tr("Enable Always Offroad"),
|
||||
left_callback=self._handle_always_offroad,
|
||||
right_text="",
|
||||
right_callback=None,
|
||||
)
|
||||
self._always_offroad_btn.action_item.right_button.set_visible(False)
|
||||
self._force_onroad_btn = dual_button_item(
|
||||
left_text=lambda: tr("Force On-Road (10 min)"),
|
||||
left_callback=self._handle_force_onroad,
|
||||
right_text="",
|
||||
right_callback=None,
|
||||
)
|
||||
self._force_onroad_btn.action_item.right_button.set_visible(False)
|
||||
self._always_offroad_btn = self._left_button(lambda: tr("Enable Always Offroad"), self._handle_always_offroad)
|
||||
self._force_onroad_btn = self._left_button(lambda: tr("Force On-Road (10 min)"), self._handle_force_onroad)
|
||||
|
||||
self._max_time_offroad = option_item(
|
||||
title=lambda: tr("Max Time Offroad"),
|
||||
@@ -1467,31 +1444,9 @@ class IQDeviceLayout(DeviceLayout):
|
||||
right_callback=self._power_off_prompt
|
||||
)
|
||||
|
||||
self._submenu_system_btn = dual_button_item(
|
||||
left_text=lambda: tr("System"),
|
||||
left_callback=lambda: self._set_submenu(self.MENU_SYSTEM),
|
||||
right_text="",
|
||||
right_callback=None,
|
||||
)
|
||||
self._submenu_system_btn.action_item.right_button.set_visible(False)
|
||||
self._submenu_system_btn.action_item.left_button = NavSectionButton(
|
||||
lambda: tr("System"), "icons/iq/sec_system.png", lambda: self._set_submenu(self.MENU_SYSTEM))
|
||||
self._submenu_maintenance_btn = dual_button_item(
|
||||
left_text=lambda: tr("Maintenance"),
|
||||
left_callback=lambda: self._set_submenu(self.MENU_MAINTENANCE),
|
||||
right_text="",
|
||||
right_callback=None,
|
||||
)
|
||||
self._submenu_maintenance_btn.action_item.right_button.set_visible(False)
|
||||
self._submenu_maintenance_btn.action_item.left_button = NavSectionButton(
|
||||
lambda: tr("Maintenance"), "icons/iq/sec_maintenance.png", lambda: self._set_submenu(self.MENU_MAINTENANCE))
|
||||
self._submenu_back_btn = dual_button_item(
|
||||
left_text=lambda: tr("Back"),
|
||||
left_callback=self._go_back,
|
||||
right_text="",
|
||||
right_callback=None,
|
||||
)
|
||||
self._submenu_back_btn.action_item.right_button.set_visible(False)
|
||||
self._submenu_system_btn = self._section_button(lambda: tr("System"), "icons/iq/sec_system.png", self.MENU_SYSTEM)
|
||||
self._submenu_maintenance_btn = self._section_button(lambda: tr("Maintenance"), "icons/iq/sec_maintenance.png", self.MENU_MAINTENANCE)
|
||||
self._submenu_back_btn = self._left_button(lambda: tr("Back"), self._go_back)
|
||||
|
||||
self._submenu_top_separator = LineSeparator(height=10)
|
||||
self._submenu_gap = Spacer(10)
|
||||
@@ -1527,6 +1482,16 @@ class IQDeviceLayout(DeviceLayout):
|
||||
|
||||
return items
|
||||
|
||||
def _left_button(self, text, callback):
|
||||
item = dual_button_item(left_text=text, left_callback=callback, right_text="", right_callback=None)
|
||||
item.action_item.right_button.set_visible(False)
|
||||
return item
|
||||
|
||||
def _section_button(self, text, icon, submenu):
|
||||
item = self._left_button(text, lambda: self._set_submenu(submenu))
|
||||
item.action_item.left_button = NavSectionButton(text, icon, lambda: self._set_submenu(submenu))
|
||||
return item
|
||||
|
||||
def _set_submenu(self, submenu: int):
|
||||
self._submenu = submenu
|
||||
# Reset scroll so switching menus doesn't keep a now-invalid offset (which jumps the view).
|
||||
@@ -1920,25 +1885,30 @@ class ModelsLayout(Widget):
|
||||
DS = custom.IQModelManager.DownloadStatus
|
||||
bundle_downloading = bundle.status == DS.downloading
|
||||
for model in bundle.models:
|
||||
if label := labels.get(getattr(model.type, 'raw', model.type)):
|
||||
label.set_visible(True)
|
||||
p = model.artifact.downloadProgress
|
||||
text, show, color, indeterminate = f"pending - {bundle.displayName}", False, rl.GRAY, False
|
||||
# Show a live bar whenever the bundle is downloading — not only when this artifact's own
|
||||
# status flips to `downloading`. RL/supercombo weights are served without a content-length,
|
||||
# so their per-artifact status/progress never updates and they used to sit on "pending".
|
||||
if p.status == DS.downloading or (bundle_downloading and p.status not in (DS.downloaded, DS.cached, DS.failed)):
|
||||
show = True
|
||||
if p.progress > 0:
|
||||
text = f"{int(p.progress)}% - {bundle.displayName}"
|
||||
else:
|
||||
text, indeterminate = f"{tr('downloading')} - {bundle.displayName}", True
|
||||
elif p.status in (DS.downloaded, DS.cached):
|
||||
status_text = tr("from cache" if p.status == DS.cached else "downloaded")
|
||||
text, color = f"{bundle.displayName} - {status_text if status_changed else tr('ready')}", ON_COLOR
|
||||
elif p.status == DS.failed:
|
||||
text, color = f"download failed - {bundle.displayName}", rl.RED
|
||||
label.action_item.update(p.progress, text, show, color, indeterminate=indeterminate)
|
||||
label = labels.get(getattr(model.type, 'raw', model.type))
|
||||
if label is None:
|
||||
continue
|
||||
label.set_visible(True)
|
||||
p = model.artifact.downloadProgress
|
||||
text, show, color, indeterminate = self._model_label_state(p, bundle, bundle_downloading, status_changed)
|
||||
label.action_item.update(p.progress, text, show, color, indeterminate=indeterminate)
|
||||
|
||||
def _model_label_state(self, p, bundle, bundle_downloading, status_changed):
|
||||
# RL/supercombo weights are served without a content-length, so their per-artifact
|
||||
# progress never updates; show a live bar whenever the bundle itself is downloading.
|
||||
DS = custom.IQModelManager.DownloadStatus
|
||||
name = bundle.displayName
|
||||
live = p.status == DS.downloading or (bundle_downloading and p.status not in (DS.downloaded, DS.cached, DS.failed))
|
||||
if live:
|
||||
if p.progress > 0:
|
||||
return f"{int(p.progress)}% - {name}", True, rl.GRAY, False
|
||||
return f"{tr('downloading')} - {name}", True, rl.GRAY, True
|
||||
if p.status in (DS.downloaded, DS.cached):
|
||||
status_text = tr("from cache" if p.status == DS.cached else "downloaded")
|
||||
return f"{name} - {status_text if status_changed else tr('ready')}", False, ON_COLOR, False
|
||||
if p.status == DS.failed:
|
||||
return f"download failed - {name}", False, rl.RED, False
|
||||
return f"pending - {name}", False, rl.GRAY, False
|
||||
|
||||
@staticmethod
|
||||
def _show_reset_params_dialog():
|
||||
|
||||
@@ -23,7 +23,7 @@ from openpilot.system.ui.lib.application import gui_app, FontWeight
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
from openpilot.system.ui.iqpilot.lib import canvas
|
||||
from opendbc.car.volkswagen.values import VolkswagenFlags
|
||||
from iqdbc.car.volkswagen.values import VolkswagenFlags
|
||||
|
||||
|
||||
# --- shared state access -----------------------------------------------------
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
|
||||
"""
|
||||
from cereal import log
|
||||
from opendbc.car import structs
|
||||
from opendbc.car.chrysler.values import RAM_DT
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user