parent
806f2d0dca
commit
e75932ded3
@ -589,8 +589,13 @@ class ScanEcus:
|
|||||||
|
|
||||||
def chooseModel(self, num):
|
def chooseModel(self, num):
|
||||||
|
|
||||||
# sorted by [vehiclename,file,vehTypeCode,vehTCOM,vehindexTopo]
|
orderBy = 1 # 0 = vehiclename
|
||||||
for row in sorted( self.vhcls, key=lambda k : k[1]):
|
# 1 = file
|
||||||
|
# 2 = vehTypeCode
|
||||||
|
# 3 = vehTCOM
|
||||||
|
# 4 = vehindexTopo
|
||||||
|
|
||||||
|
for row in sorted( self.vhcls, key=lambda k : k[orderBy]):
|
||||||
self.models.append( row[2]+" "+row[0] )
|
self.models.append( row[2]+" "+row[0] )
|
||||||
|
|
||||||
if num==0 or num>len(self.models):
|
if num==0 or num>len(self.models):
|
||||||
@ -598,18 +603,21 @@ class ScanEcus:
|
|||||||
else:
|
else:
|
||||||
ch = [self.models[num-1],num]
|
ch = [self.models[num-1],num]
|
||||||
|
|
||||||
model = ch[0]
|
choice = sorted( self.vhcls, key=lambda k : k[orderBy])[int(ch[1])-1]
|
||||||
|
|
||||||
print "Loading data for :", model, self.vhcls[int(ch[1])-1][1],
|
model = choice[0]
|
||||||
|
tcomfilename = choice[1]
|
||||||
|
|
||||||
|
print "Loading data for :", model, tcomfilename,
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
self.allecus = {}
|
self.allecus = {}
|
||||||
|
|
||||||
if self.elm.lf!=0:
|
if self.elm.lf!=0:
|
||||||
self.elm.lf.write("#load: "+model+' '+self.vhcls[int(ch[1])-1][1]+"\n")
|
self.elm.lf.write("#load: "+model+' '+tcomfilename+"\n")
|
||||||
self.elm.lf.flush()
|
self.elm.lf.flush()
|
||||||
|
|
||||||
self.load_model_ECUs( "../Vehicles/"+self.vhcls[int(ch[1])-1][1] )
|
self.load_model_ECUs( "../Vehicles/"+tcomfilename )
|
||||||
print " - "+str(len(self.allecus))+" ecus loaded"
|
print " - "+str(len(self.allecus))+" ecus loaded"
|
||||||
|
|
||||||
def compare_ecu( self, row, rrsp, req ):
|
def compare_ecu( self, row, rrsp, req ):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user