mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-05 05:22:07 +08:00
Nissan: log FW responses on bus 0 (#31138)
* nissan: log FW responses on bus 0 * update refs old-commit-hash: b9ad854451ce642a05c487d96a1a9bc2181bb3ba
This commit is contained in:
@@ -59,27 +59,35 @@ NISSAN_VERSION_RESPONSE_KWP = b'\x61\x83'
|
||||
NISSAN_RX_OFFSET = 0x20
|
||||
|
||||
FW_QUERY_CONFIG = FwQueryConfig(
|
||||
requests=[
|
||||
requests=[request for bus, logging in ((0, True), (1, False)) for request in [
|
||||
Request(
|
||||
[NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP],
|
||||
[NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP],
|
||||
bus=bus,
|
||||
logging=logging,
|
||||
),
|
||||
Request(
|
||||
[NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP],
|
||||
[NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP],
|
||||
rx_offset=NISSAN_RX_OFFSET,
|
||||
bus=bus,
|
||||
logging=logging,
|
||||
),
|
||||
# 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],
|
||||
bus=bus,
|
||||
logging=logging,
|
||||
),
|
||||
Request(
|
||||
[StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST],
|
||||
[StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE],
|
||||
rx_offset=NISSAN_RX_OFFSET,
|
||||
bus=bus,
|
||||
logging=logging,
|
||||
),
|
||||
],
|
||||
]],
|
||||
)
|
||||
|
||||
DBC = {
|
||||
|
||||
@@ -238,7 +238,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
|
||||
|
||||
@pytest.mark.timeout(60)
|
||||
def test_fw_query_timing(self):
|
||||
total_ref_time = 6.1
|
||||
total_ref_time = 6.5
|
||||
brand_ref_times = {
|
||||
1: {
|
||||
'body': 0.1,
|
||||
@@ -247,7 +247,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
|
||||
'honda': 0.45,
|
||||
'hyundai': 0.65,
|
||||
'mazda': 0.2,
|
||||
'nissan': 0.4,
|
||||
'nissan': 0.8,
|
||||
'subaru': 0.45,
|
||||
'tesla': 0.2,
|
||||
'toyota': 1.6,
|
||||
|
||||
Reference in New Issue
Block a user