Skip to content

Commit 9e0f34b

Browse files
author
Brendan Whitfield
committed
removed redundant decoder todo
1 parent 6e5b074 commit 9e0f34b

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

obd/commands.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@
117117

118118
# name description cmd bytes decoder ECU fast
119119
OBDCommand("PIDS_C" , "Supported PIDs [41-60]" , "0140", 4, pid, ECU.ENGINE, True),
120-
OBDCommand("STATUS_DRIVE_CYCLE" , "Monitor status this drive cycle" , "0141", 4, todo, ECU.ENGINE, True),
121-
OBDCommand("CONTROL_MODULE_VOLTAGE" , "Control module voltage" , "0142", 2, todo, ECU.ENGINE, True),
122-
OBDCommand("ABSOLUTE_LOAD" , "Absolute load value" , "0143", 2, todo, ECU.ENGINE, True),
123-
OBDCommand("COMMAND_EQUIV_RATIO" , "Command equivalence ratio" , "0144", 2, todo, ECU.ENGINE, True),
120+
OBDCommand("STATUS_DRIVE_CYCLE" , "Monitor status this drive cycle" , "0141", 4, noop, ECU.ENGINE, True),
121+
OBDCommand("CONTROL_MODULE_VOLTAGE" , "Control module voltage" , "0142", 2, noop, ECU.ENGINE, True),
122+
OBDCommand("ABSOLUTE_LOAD" , "Absolute load value" , "0143", 2, noop, ECU.ENGINE, True),
123+
OBDCommand("COMMAND_EQUIV_RATIO" , "Command equivalence ratio" , "0144", 2, noop, ECU.ENGINE, True),
124124
OBDCommand("RELATIVE_THROTTLE_POS" , "Relative throttle position" , "0145", 1, percent, ECU.ENGINE, True),
125125
OBDCommand("AMBIANT_AIR_TEMP" , "Ambient air temperature" , "0146", 1, temp, ECU.ENGINE, True),
126126
OBDCommand("THROTTLE_POS_B" , "Absolute throttle position B" , "0147", 1, percent, ECU.ENGINE, True),

obd/decoders.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ def <name>(_hex):
4545
'''
4646

4747

48-
# todo
49-
def todo(_hex):
50-
return (_hex, Unit.NONE)
51-
5248
# hex in, hex out
5349
def noop(_hex):
5450
return (_hex, Unit.NONE)

tests/test_OBD.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
import obd
3-
from obd.utils import SerialStatus
3+
from obd.utils import OBDStatus
44
from obd.OBDResponse import OBDResponse
55
from obd.OBDCommand import OBDCommand
66
from obd.decoders import noop
@@ -32,7 +32,7 @@ def write(cmd):
3232
3333
o.is_connected = lambda *args: True
3434
o.port.is_connected = lambda *args: True
35-
o.port._ELM327__status = SerialStatus.CAR_CONNECTED
35+
o.port._ELM327__status = OBDStatus.CAR_CONNECTED
3636
o.port._ELM327__protocol = SAE_J1850_PWM([])
3737
o.port._ELM327__primary_ecu = 0x10
3838
o.port._ELM327__write = write

0 commit comments

Comments
 (0)