Files
sunnypilot-byd/opendbc_repo/opendbc/sunnypilot/car/honda/mads.py
T
github-actions[bot] de77c89cf6 sunnypilot v2026.002.000
version: sunnypilot v2026.002.000 (staging)
date: 2026-07-21T07:44:02
master commit: 2c334ede443d7391d27575af8c854a095ba702a8
2026-07-21 07:44:02 +00:00

23 lines
747 B
Python

"""
Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors.
This file is part of sunnypilot and is licensed under the MIT License.
See the LICENSE.md file in the root directory for more details.
"""
from opendbc.car import structs
from opendbc.car.honda.values import HONDA_BOSCH_RADARLESS
class MadsCarController:
def __init__(self):
self.dashed_lanes = False
def update(self, CP: structs.CarParams, CC: structs.CarControl, CC_SP: structs.CarControlSP) -> None:
enable_mads = CC_SP.mads.available
if enable_mads:
self.dashed_lanes = CC_SP.mads.enabled and not CC.latActive
else:
self.dashed_lanes = CC.hudControl.lanesVisible if CP.carFingerprint in HONDA_BOSCH_RADARLESS else False