IQ.Pilot Release Commit @ bec7652
This commit is contained in:
3
iqpilot/ui/mici/onroad/__init__.py
Normal file
3
iqpilot/ui/mici/onroad/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
|
||||
"""
|
||||
30
iqpilot/ui/mici/onroad/confidence_ball.py
Normal file
30
iqpilot/ui/mici/onroad/confidence_ball.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
|
||||
"""
|
||||
import pyray as rl
|
||||
from iqpilot.selfdrive.ui.ui_state import ui_state, UIStatus
|
||||
|
||||
|
||||
ACTIVE_CONFIDENCE_TOP = rl.Color(0x22, 0xB8, 0xB9, 0xFF)
|
||||
ACTIVE_CONFIDENCE_BOTTOM = rl.Color(0x0C, 0x94, 0x96, 0xFF)
|
||||
MEDIUM_CONFIDENCE_TOP = rl.Color(255, 200, 0, 255)
|
||||
MEDIUM_CONFIDENCE_BOTTOM = rl.Color(255, 115, 0, 255)
|
||||
LOW_CONFIDENCE_TOP = rl.Color(255, 0, 21, 255)
|
||||
LOW_CONFIDENCE_BOTTOM = rl.Color(255, 0, 89, 255)
|
||||
|
||||
|
||||
class IQConfidenceBall:
|
||||
@staticmethod
|
||||
def get_animate_status_probs():
|
||||
if ui_state.status == UIStatus.LAT_ONLY:
|
||||
return ui_state.sm['modelV2'].meta.disengagePredictions.steerOverrideProbs
|
||||
|
||||
return ui_state.sm['modelV2'].meta.disengagePredictions.brakeDisengageProbs
|
||||
|
||||
@staticmethod
|
||||
def get_lat_long_dot_colors(confidence: float) -> tuple[rl.Color, rl.Color]:
|
||||
if confidence > 0.5:
|
||||
return ACTIVE_CONFIDENCE_TOP, ACTIVE_CONFIDENCE_BOTTOM
|
||||
if confidence > 0.2:
|
||||
return MEDIUM_CONFIDENCE_TOP, MEDIUM_CONFIDENCE_BOTTOM
|
||||
return LOW_CONFIDENCE_TOP, LOW_CONFIDENCE_BOTTOM
|
||||
25
iqpilot/ui/mici/onroad/hud_renderer.py
Normal file
25
iqpilot/ui/mici/onroad/hud_renderer.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos
|
||||
"""
|
||||
import pyray as rl
|
||||
|
||||
from iqpilot.selfdrive.ui.mici.onroad.hud_renderer import HudRenderer
|
||||
from iqpilot.ui.onroad.hud_overlays import IQBlindSpotOverlay
|
||||
|
||||
class IQMiciHudRenderer(HudRenderer):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._overlays = [IQBlindSpotOverlay()]
|
||||
|
||||
def _update_state(self) -> None:
|
||||
super()._update_state()
|
||||
for overlay in self._overlays:
|
||||
overlay.update()
|
||||
|
||||
def _render(self, rect: rl.Rectangle) -> None:
|
||||
super()._render(rect)
|
||||
for overlay in self._overlays:
|
||||
overlay.render(rect)
|
||||
|
||||
def _has_blind_spot_detected(self) -> bool:
|
||||
return any(getattr(overlay, "detected", False) for overlay in self._overlays)
|
||||
10
iqpilot/ui/mici/onroad/road_label.py
Normal file
10
iqpilot/ui/mici/onroad/road_label.py
Normal file
@@ -0,0 +1,10 @@
|
||||
"""
|
||||
Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos/
|
||||
"""
|
||||
from iqpilot.ui.onroad.hud_overlays import RoadNameBanner
|
||||
|
||||
class RoadNameRendererMici(RoadNameBanner):
|
||||
TYPE_SIZE = 18
|
||||
MARGIN = 120
|
||||
GAP = 2
|
||||
TORQUE_SCALE = 1.0
|
||||
Reference in New Issue
Block a user