This commit is contained in:
firestar5683
2026-08-18 17:28:05 -05:00
committed by whoisdomi
parent b9cd54f407
commit 05331a78c9
12 changed files with 141 additions and 65 deletions
@@ -709,7 +709,7 @@ IONIQ_5_LOW_SPEED_CENTER_LAT = 0.40
IONIQ_5_LOW_SPEED_CENTER_LAT_WIDTH = 0.10
IONIQ_5_LOW_SPEED_CENTER_JERK = 0.40
IONIQ_5_LOW_SPEED_CENTER_JERK_WIDTH = 0.12
IONIQ_5_FRICTION_JERK_DEADZONE_MAX = 0.30
IONIQ_5_FRICTION_JERK_DEADZONE_MAX = 0.36
IONIQ_5_FRICTION_JERK_DEADZONE_LAT = 1.25
IONIQ_5_FRICTION_JERK_DEADZONE_LAT_WIDTH = 0.35
IONIQ_5_FRICTION_JERK_DEADZONE_SPEED = 18.0
+2 -2
View File
@@ -56,7 +56,7 @@ MonitoringPolicy = log.DriverMonitoringState.MonitoringPolicy
StarPilotEventName = custom.StarPilotOnroadEvent.EventName
IGNORED_SAFETY_MODES = (SafetyModel.silent, SafetyModel.noOutput)
VALID_ONLY_COMM_ISSUE_GRACE_FRAMES = max(1, round(0.25 / DT_CTRL))
VALID_ONLY_COMM_ISSUE_GRACE_FRAMES = max(1, round(0.5 / DT_CTRL))
def evaluate_comm_issue(all_checks: bool, all_alive: bool, all_freq_ok: bool,
@@ -515,7 +515,7 @@ class SelfdriveD:
self.events.add(EventName.pedalPressed)
# Create events for temperature, disk space, and memory
if self.sm['deviceState'].thermalStatus >= ThermalStatus.red:
if self.sm['deviceState'].thermalStatus >= ThermalStatus.overheated:
self.events.add(EventName.overheat)
if self.sm['deviceState'].freeSpacePercent < 7 and not SIMULATION:
self.events.add(EventName.outOfSpace)
@@ -3,6 +3,7 @@ import cereal.messaging as messaging
from cereal import car, custom, log
from opendbc.car.hyundai.values import CAR as HYUNDAI_CAR
from opendbc.car.nissan.values import CAR as NISSAN_CAR
from openpilot.common.realtime import DT_CTRL
from openpilot.selfdrive.selfdrived.selfdrived import (
VALID_ONLY_COMM_ISSUE_GRACE_FRAMES,
@@ -27,6 +28,13 @@ def test_valid_only_comm_issue_is_debounced():
assert frames == 0
def test_route_length_validity_cascade_stays_silent():
frames = 0
for _ in range(round(0.4 / DT_CTRL)):
should_alert, frames = evaluate_comm_issue(False, True, True, frames)
assert not should_alert
def test_dead_or_slow_comm_issue_is_immediate():
assert evaluate_comm_issue(False, False, True, 0) == (True, 0)
assert evaluate_comm_issue(False, True, False, 0) == (True, 0)
+2 -2
View File
@@ -122,9 +122,9 @@ class Sidebar(Widget):
thermal_status = device_state.thermalStatus
temperature = f"{int(device_state.maxTempC)}°C"
if thermal_status == ThermalStatus.green:
if thermal_status == ThermalStatus.ok:
self._temp_status.update(tr_noop("TEMP"), temperature, Colors.GOOD)
elif thermal_status == ThermalStatus.yellow:
elif thermal_status == ThermalStatus.warmDEPRECATED:
self._temp_status.update(tr_noop("TEMP"), temperature, Colors.WARNING)
else:
self._temp_status.update(tr_noop("TEMP"), temperature, Colors.DANGER)