pull/23762/head
Shane Smiskol 3 years ago
parent f771c7231d
commit ed5cd78ba4
  1. 26
      selfdrive/car/nissan/values.py

@ -1,4 +1,6 @@
from selfdrive.car import dbc_dict from enum import Enum
from selfdrive.car import CarInfo, dbc_dict
from cereal import car from cereal import car
Ecu = car.CarParams.Ecu Ecu = car.CarParams.Ecu
@ -10,16 +12,26 @@ class CarControllerParams:
LKAS_MAX_TORQUE = 1 # A value of 1 is easy to overpower LKAS_MAX_TORQUE = 1 # A value of 1 is easy to overpower
STEER_THRESHOLD = 1.0 STEER_THRESHOLD = 1.0
class CAR:
XTRAIL = "NISSAN X-TRAIL 2017" class CAR(Enum):
LEAF = "NISSAN LEAF 2018" XTRAIL = 0
LEAF = 1
# Leaf with ADAS ECU found behind instrument cluster instead of glovebox # Leaf with ADAS ECU found behind instrument cluster instead of glovebox
# Currently the only known difference between them is the inverted seatbelt signal. # Currently the only known difference between them is the inverted seatbelt signal.
LEAF_IC = "NISSAN LEAF 2018 Instrument Cluster" LEAF_IC = 2
ROGUE = "NISSAN ROGUE 2019" ROGUE = 3
ALTIMA = "NISSAN ALTIMA 2020" ALTIMA = 4
CAR_INFO = {
CAR.XTRAIL: CarInfo("Nissan X-Trail", {2017}, "ProPILOT"),
CAR.LEAF: CarInfo("Nissan Leaf", {2018, 2019, 2020, 2021, 2022}, "ProPILOT"),
# TODO: ensure we can leave out cars when generating docs
# CAR.LEAF_IC: CarInfo("Nissan Leaf Instrument Cluster", {2018, 2019, 2020, 2021, 2022}, "ProPILOT"),
CAR.ROGUE: CarInfo("Nissan Rogue", {2018, 2019, 2020}),
CAR.ALTIMA: CarInfo("Nissan Altima", {2019, 2020}, "ProPILOT"),
}
FINGERPRINTS = { FINGERPRINTS = {
CAR.XTRAIL: [ CAR.XTRAIL: [
{ {

Loading…
Cancel
Save