version: sunnypilot v2026.002.000 (staging) date: 2026-07-21T07:44:02 master commit: 2c334ede443d7391d27575af8c854a095ba702a8
25 lines
635 B
Python
25 lines
635 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 collections import namedtuple
|
|
from opendbc.car import structs
|
|
|
|
|
|
class NissanSafetyFlagsSP:
|
|
DEFAULT = 0
|
|
LEAF = 1
|
|
|
|
|
|
ButtonType = structs.CarState.ButtonEvent.Type
|
|
Button = namedtuple('Button', ['event_type', 'can_addr', 'can_msg', 'values'])
|
|
|
|
|
|
BUTTONS = [
|
|
Button(ButtonType.accelCruise, "CRUISE_THROTTLE", "RES_BUTTON", [1]),
|
|
Button(ButtonType.decelCruise, "CRUISE_THROTTLE", "SET_BUTTON", [1]),
|
|
]
|