Skip to content

Commit 9f2df62

Browse files
author
Brendan Whitfield
committed
added baudrate param to Async, removed old strip util
1 parent 2e4876a commit 9f2df62

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

obd/async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
class Async(OBD):
3939
""" subclass representing an OBD-II connection """
4040

41-
def __init__(self, portstr=None):
42-
super(Async, self).__init__(portstr)
41+
def __init__(self, portstr=None, baudrate=38400):
42+
super(Async, self).__init__(portstr, baudrate)
4343
self.commands = {} # key = OBDCommand, value = Response
4444
self.callbacks = {} # key = OBDCommand, value = list of Functions
4545
self.thread = None

obd/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ def ascii_to_bytes(a):
9494
b.append(int(a[i:i+2], 16))
9595
return b
9696

97-
def strip(s):
98-
return "".join(s.split())
99-
10097
def numBitsSet(n):
10198
# TODO: there must be a better way to do this...
10299
total = 0

0 commit comments

Comments
 (0)