-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMX5NC2PIDs.py
93 lines (83 loc) · 2.42 KB
/
MX5NC2PIDs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
from obd import OBDCommand, Unit
from obd.protocols import ECU
from obd.utils import bytes_to_int
from MX5NC2Decoders import *
#MX5 NC extra PIDs
# 7E0 and 7e0 might be different
# Steering wheel (ABS thing) is 760, not 720
MX5_BRK_SW = OBDCommand("MX5 Brake Switch",# - Tested, returns 2 if brake is pressed at all.
"On/Off Check if brake oedak is pressed/engaged", # description
b"221101", # command
4,# number of return bytes to expect
OneZero,# decoding function
ECU.ALL,
True,
b'7e0') # 7E0 is default
MX5_NEUTRAL_SW = OBDCommand("Park/Neutral Position Switch",# - Works
"On/Off Park/Neutral detection. Returns 0 (False) if NOT in neutral, else 4", # description
b"22a211", # Mode+PID, no 0x
4,
OneZero,
ECU.ALL,
True,
b'7e0')
MX5_WHL_ANG = OBDCommand("MX5 Steering Wheel Position",# - Works
"Check if Brake is pressed", # description
b"223201",# command (no 0x needed)
5,# number of return bytes to expect
raw,# decoding function
ECU.ALL,# (optional) ECU filter
True,# (optional) allow a "01" to be added for speed
b'720')# 7E0 is default, must be in byte format with b''
MX_5_ACCL_PDL = OBDCommand("Full range accelerator pedal",# - Works
"Accel Pedal Position (full range)", # description
b"221340",
5,
acclPercent,
ECU.ALL,
True,
b'7e0')
MX5_BRKCLTCH_PRES_SW = OBDCommand("Brake Pressure Applied Switch + Clutch position switch",# - Works
""" On/Off Brake Pressure Applied + Clutch Pedal Position Switch.
0 no pedal,
1 clutch,
2 brake,
3 brake+clutch """, # description
b"22a211",
5,
brakeClutch,
ECU.ALL,
True,
b'7e0')
MX5_INGEAR_SW = OBDCommand("In gear switch",
"On/Off In gear switch",
b"221101",
4,
OneZero,
ECU.ALL,
True,
b'7e0')
MX5_AC_REFRG_SW = OBDCommand("AC Refrigerant Switch ",
"On/Off A/C Refrigerant Pressure Switch",
b"221104",# Mode+PID, no 0x
5,
OneZero,
ECU.ALL,
True,
b'7e0')
MX5_AC_RELAY = OBDCommand("AC Relay",
"On/Off A/C Relay",
b"221101",
5,
OneZero,
ECU.ALL,
True,
b'7e0')
MX5_CC_V = OBDCommand("Cruise Control Voltage (resistance)",
"Cruise Control voltage resistance reading. Can be used to view button presses",
b"22a216",
5,
raw,
ECU.ALL,
True,
b'7e0')