mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-12 04:42:13 +08:00
Nissan: add alt request for engine on Rogue (#29477)
* get engine * \xda should work * fix issue * Update selfdrive/car/nissan/values.py * bump ref * other ref old-commit-hash: ac07c205ed70745da1400b69afb38c5ee81d1241
This commit is contained in:
@@ -80,9 +80,14 @@ FINGERPRINTS = {
|
||||
]
|
||||
}
|
||||
|
||||
# Default diagnostic session
|
||||
NISSAN_DIAGNOSTIC_REQUEST_KWP = bytes([uds.SERVICE_TYPE.DIAGNOSTIC_SESSION_CONTROL, 0x81])
|
||||
NISSAN_DIAGNOSTIC_RESPONSE_KWP = bytes([uds.SERVICE_TYPE.DIAGNOSTIC_SESSION_CONTROL + 0x40, 0x81])
|
||||
|
||||
# Manufacturer specific
|
||||
NISSAN_DIAGNOSTIC_REQUEST_KWP_2 = bytes([uds.SERVICE_TYPE.DIAGNOSTIC_SESSION_CONTROL, 0xda])
|
||||
NISSAN_DIAGNOSTIC_RESPONSE_KWP_2 = bytes([uds.SERVICE_TYPE.DIAGNOSTIC_SESSION_CONTROL + 0x40, 0xda])
|
||||
|
||||
NISSAN_VERSION_REQUEST_KWP = b'\x21\x83'
|
||||
NISSAN_VERSION_RESPONSE_KWP = b'\x61\x83'
|
||||
|
||||
@@ -99,6 +104,11 @@ FW_QUERY_CONFIG = FwQueryConfig(
|
||||
[NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP],
|
||||
rx_offset=NISSAN_RX_OFFSET,
|
||||
),
|
||||
# Rogue's engine solely responds to this
|
||||
Request(
|
||||
[NISSAN_DIAGNOSTIC_REQUEST_KWP_2, NISSAN_VERSION_REQUEST_KWP],
|
||||
[NISSAN_DIAGNOSTIC_RESPONSE_KWP_2, NISSAN_VERSION_RESPONSE_KWP],
|
||||
),
|
||||
Request(
|
||||
[StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST],
|
||||
[StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE],
|
||||
|
||||
@@ -220,7 +220,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
|
||||
print(f'get_vin, query time={vin_time / self.N} seconds')
|
||||
|
||||
def test_fw_query_timing(self):
|
||||
total_ref_time = 6.1
|
||||
total_ref_time = 6.2
|
||||
brand_ref_times = {
|
||||
1: {
|
||||
'body': 0.1,
|
||||
@@ -229,7 +229,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
|
||||
'honda': 0.5,
|
||||
'hyundai': 0.7,
|
||||
'mazda': 0.2,
|
||||
'nissan': 0.3,
|
||||
'nissan': 0.4,
|
||||
'subaru': 0.2,
|
||||
'tesla': 0.2,
|
||||
'toyota': 1.6,
|
||||
|
||||
Reference in New Issue
Block a user