toyota: keep can_valid true when this car omits several messages

This 2026 Sienna PRC does not broadcast DSU_CRUISE (0x365), GEAR_PACKET
(0x3BC), GEAR_PACKET_HYBRID (0x127), PCM_CRUISE_ALT (0x3F1) or VSC1S07
(0x320). carstate reads all of them, and VLDict.__getitem__ auto-registers any
message it has not seen, with freq=None -> ignore_alive=False. Their absence
therefore forced CANParser.can_valid=False, which made
interfaces.py set CarState.canValid=False and controlsd mark carControl invalid
('cc_send.valid = CS.canValid'), blocking ACC.

Register the five messages up front with a NaN rate instead, the same trick the
existing BLINKERS_STATE entry uses: the parser still decodes them when present
but treats them as alive-ignored, so they cannot drag can_valid down.
This commit is contained in:
Comma Device
2026-09-14 20:28:58 +08:00
parent a5e3c79fcc
commit a3bd2cf438
@@ -220,6 +220,16 @@ class CarState(CarStateBase, CarStateExt):
def get_can_parsers(CP, CP_SP):
pt_messages = [
("BLINKERS_STATE", float('nan')),
# This car does not broadcast these messages. Registering them with a NaN
# rate marks them alive-ignored, so their absence no longer forces
# can_valid=False (which made controlsd set carControl invalid and
# blocked ACC). Merely reading cp.vl[...] would auto-register them as
# alive-required instead.
("DSU_CRUISE", float('nan')),
("GEAR_PACKET", float('nan')),
("GEAR_PACKET_HYBRID", float('nan')),
("PCM_CRUISE_ALT", float('nan')),
("VSC1S07", float('nan')),
]
cam_messages = [