STN fix, FAV Tab support for IDs

This commit is contained in:
Marianpol 2020-01-09 10:41:15 +01:00
parent c9bf6b9326
commit bd3c0262af
2 changed files with 14 additions and 5 deletions

View File

@ -549,7 +549,7 @@ class ECU:
if len(fl):
for drname in fl:
drname = drname.strip().replace('\n','')
if not (drname.startswith("PR") or drname.startswith("ET")):
if not (drname.startswith("PR") or drname.startswith("ET") or drname.startswith("ID")):
return False
else:
self.add_elem(drname)
@ -574,6 +574,14 @@ class ECU:
return False
else:
return st
elif elem[:2] =="ID":
for idk in self.Identifications.keys():
if self.Identifications[idk].agcdRef == elem:
if not any(idk == dr.name for dr in favouriteScreen.datarefs):
favouriteScreen.datarefs.append(ecu_screen_dataref("",idk,"Identification"))
return False
else:
return idk
else:
return False
@ -588,6 +596,10 @@ class ECU:
for st in self.States.keys():
if dr.name == st:
fl.write(self.States[st].agcdRef + "\n")
if dr.name.startswith('I'):
for idk in self.Identifications.keys():
if dr.name == idk:
fl.write(self.Identifications[idk].agcdRef + "\n")
fl.close()
def show_subfunction(self, subfunction, path):

View File

@ -1879,11 +1879,7 @@ class ELM:
else:
RXa = 'undefined'
if mod_globals.opt_stn: # fix for STN
self.check_answer(self.cmd("at sp 6"))
self.check_answer (self.cmd ("at sh " + TXa))
self.check_answer (self.cmd ("at cra " + RXa))
self.check_answer (self.cmd ("at fc sh " + TXa))
self.check_answer (self.cmd ("at fc sd 30 00 00")) # status BS STmin
self.check_answer (self.cmd ("at fc sm 1"))
@ -1909,6 +1905,7 @@ class ELM:
self.set_can_500()
self.check_answer (self.cmd ("at at 1")) # reset adaptive timing step 3
self.check_answer (self.cmd ("at cra " + RXa))
self.check_adapter ()