Use STI to recognize OBDLink
OBDLink needs to support STPX command
This commit is contained in:
parent
11a35767b2
commit
7166faf04b
@ -604,8 +604,13 @@ class ELM:
|
|||||||
self.lf.flush()
|
self.lf.flush()
|
||||||
|
|
||||||
# check OBDLink
|
# check OBDLink
|
||||||
elm_rsp = self.cmd("STPR")
|
elm_rsp = self.cmd("STI")
|
||||||
if elm_rsp and '?' not in elm_rsp:
|
if elm_rsp and '?' not in elm_rsp:
|
||||||
|
firmware_version = elm_rsp.split(" ")[-1]
|
||||||
|
firmware_version = firmware_version.split(".")
|
||||||
|
version_number = int(''.join([re.sub('\D', '', version) for version in firmware_version]))
|
||||||
|
stpx_introduced_in_version_number = 420 #STN1110 got STPX last in version v4.2.0
|
||||||
|
if version_number >= stpx_introduced_in_version_number:
|
||||||
mod_globals.opt_obdlink = True
|
mod_globals.opt_obdlink = True
|
||||||
|
|
||||||
# check STN
|
# check STN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user