Skip to content

Commit

Permalink
query fw versions example - use extended diagnostic session
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjhogan committed Dec 13, 2019
1 parent 4e9d788 commit ac0fd5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/query_fw_versions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
from tqdm import tqdm
from panda import Panda
from panda.python.uds import UdsClient, MessageTimeoutError, NegativeResponseError, DATA_IDENTIFIER_TYPE
from panda.python.uds import UdsClient, MessageTimeoutError, NegativeResponseError, SESSION_TYPE, DATA_IDENTIFIER_TYPE

if __name__ == "__main__":
addrs = [0x700 + i for i in range(256)]
Expand All @@ -21,6 +21,7 @@
uds_client = UdsClient(panda, addr, bus=1 if panda.has_obd() else 0, timeout=0.1, debug=False)
try:
uds_client.tester_present()
uds_client.diagnostic_session_control(SESSION_TYPE.EXTENDED_DIAGNOSTIC)
except NegativeResponseError:
pass
except MessageTimeoutError:
Expand Down

0 comments on commit ac0fd5d

Please sign in to comment.