Skip to content

Commit

Permalink
close #679
Browse files Browse the repository at this point in the history
  • Loading branch information
Furtif committed Sep 24, 2022
1 parent d717ec2 commit b20544d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions elm.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,15 +587,15 @@ def __init__(self, portName, rate, adapter_type="STD", maxspeed="No"):
# Purge unread data
self.port.expect(">")
res = self.send_raw("ATZ")
if not 'ELM' in res:
options.elm_failed = True
options.last_error = _("No ELM interface on port") + " %s" % portName
else:
if 'ELM' in res or 'OBDII' in res:
options.last_error = ""
options.elm_failed = False
self.connectionStatus = True
rate = speed
break
else:
options.elm_failed = True
options.last_error = _("No ELM interface on port") + " %s" % portName

try:
maxspeed = int(maxspeed)
Expand Down

0 comments on commit b20544d

Please sign in to comment.