fix: thermald crash on startup — CarState is in cereal.car, not cereal.log
The new fan control plumbing referenced log.CarState.GearShifter.park, but CarState is defined in car.capnp and only DeviceState/PandaState live in log.capnp. Thermald crashed immediately on first carState tick, which meant deviceState stopped publishing entirely. The UI then read stale/default values — freeSpacePercent=0 → "100% full" → "Out of Storage" alert despite 65 GB actually free. The fan also stopped updating. from cereal import car, log (was just log) car.CarState.GearShifter.park (was log.CarState...) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ from pathlib import Path
|
||||
import psutil
|
||||
|
||||
import cereal.messaging as messaging
|
||||
from cereal import log
|
||||
from cereal import car, log
|
||||
from cereal.services import SERVICE_LIST
|
||||
from openpilot.common.dict_helpers import strip_deprecated_keys
|
||||
from openpilot.common.filter_simple import FirstOrderFilter
|
||||
@@ -296,7 +296,7 @@ def thermald_thread(end_event, hw_queue) -> None:
|
||||
if sm.seen['carState']:
|
||||
cs = sm['carState']
|
||||
standstill = cs.standstill
|
||||
is_parked = cs.gearShifter == log.CarState.GearShifter.park
|
||||
is_parked = cs.gearShifter == car.CarState.GearShifter.park
|
||||
else:
|
||||
standstill = False
|
||||
is_parked = True # default safe: assume parked, no fan floor
|
||||
|
||||
Reference in New Issue
Block a user