-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprint_cmds.py
20 lines (16 loc) · 1.62 KB
/
print_cmds.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 24 12:40:57 2021
@author: FCAD
"""
pids=("210","2101","2101","2103","2103","2104","2105","2105","2106","2106","2107","2112","2113","2121","2121","2121","2121","2122","2123","2124","2124","2126","2129","2129","2137","2141","2141","2142","2143","2144","2146","2147","2147","2148","2149","2149","2153","2158","2161","2162","2167","2168","2170","2171","2174","2175","2178","2179","2181","2187","2192","2195","2198","015B","211D","211F","213C","213C","213C","213D","213D","214A","214B","214C","215A","215F","217C","217D","218A","218E","219B","21A1","21A1","21A3","21A6","21A7","21BE","21C1","21C1","21C2")
modes=("700","7","700","7B0","7","7","7B0","7","7B0","7","7B0","7C0","7C0","7B0","7C0","7C4","700","7C4","7C0","7C4","7","7C4","7C0","7C4","7","7C4","700","7B0","7C4","7C4","7B0","7B0","7","7B0","7C4","7","7C4","7B0","700","700","700","700","700","700","700","700","700","700","700","700","700","700","700","700","7B0","7B0","7B0","7C4","7","7B0","7C4","7C4","7C4","7C4","7B0","7B0","700","700","700","700","700","7B0","7C0","7B0","7B0","7C0","7B0","7","700","700")
for i in range(0,80,1):
print("cmd"+str(i)+modes[i]+" = OBDCommand(\"cmd"+str(i)+modes[i]+"\",\"cmd"+str(i)+modes[i]+"\",b\""+ pids[i] +"\", 2, decode, True, \""+ modes[i] +"\")")
for i in range(0,80,1):
print("connection.supported_commands.add(cmd"+str(i)+modes[i]+")")
for i in range(0,80,1):
print("response = connection.query(cmd"+str(i)+modes[i]+") # send the command")
print("log.write(str(response.value) + '\\n')")
print("print(str(response.value) + '\\n')")
print("time.sleep(1) ")