Ncalib button fix
This commit is contained in:
parent
afba3250de
commit
bef10d2b79
@ -122,7 +122,8 @@ def run( elm, ecu, command, data ):
|
|||||||
if ncalibButtons.attrib["name"] == "Buttons":
|
if ncalibButtons.attrib["name"] == "Buttons":
|
||||||
for ncalibButton in ncalibButtons:
|
for ncalibButton in ncalibButtons:
|
||||||
buttons[ncalibButton.attrib["name"]] = ncalibButton.attrib["value"]
|
buttons[ncalibButton.attrib["name"]] = ncalibButton.attrib["value"]
|
||||||
ecusList.append(ecus(vDiagName.attrib["name"],ncalibName.attrib["name"], buttons))
|
ecusList.append(ecus(vDiagName.attrib["name"],ncalibName.attrib["name"], buttons))
|
||||||
|
buttons = OrderedDict()
|
||||||
else:
|
else:
|
||||||
if vDiagButtons.attrib["name"] == "Buttons":
|
if vDiagButtons.attrib["name"] == "Buttons":
|
||||||
for vDiagButton in vDiagButtons:
|
for vDiagButton in vDiagButtons:
|
||||||
@ -189,6 +190,12 @@ def run( elm, ecu, command, data ):
|
|||||||
# for l in i.buttons.keys():
|
# for l in i.buttons.keys():
|
||||||
# print l
|
# print l
|
||||||
# print str(i.buttons[l])
|
# print str(i.buttons[l])
|
||||||
|
# print
|
||||||
|
|
||||||
|
# print correctEcu.vdiag
|
||||||
|
# print correctEcu.ncalib
|
||||||
|
# for k,v in correctEcu.buttons.iteritems():
|
||||||
|
# print k,v
|
||||||
|
|
||||||
#Prepare buttons
|
#Prepare buttons
|
||||||
buttons = OrderedDict()
|
buttons = OrderedDict()
|
||||||
@ -227,7 +234,7 @@ def run( elm, ecu, command, data ):
|
|||||||
begin = int(ScmParam['Idents'+key+'Begin'])
|
begin = int(ScmParam['Idents'+key+'Begin'])
|
||||||
end = int(ScmParam['Idents'+key+'End'])
|
end = int(ScmParam['Idents'+key+'End'])
|
||||||
identsKeys[key] = {"begin": begin, "end": end}
|
identsKeys[key] = {"begin": begin, "end": end}
|
||||||
try:
|
try: #10099 trap
|
||||||
identsList['D'+str(begin)] = ScmParam['Ident'+str(begin)]
|
identsList['D'+str(begin)] = ScmParam['Ident'+str(begin)]
|
||||||
except:
|
except:
|
||||||
break
|
break
|
||||||
@ -262,7 +269,7 @@ def run( elm, ecu, command, data ):
|
|||||||
failMessage = get_message('MessageNACK')
|
failMessage = get_message('MessageNACK')
|
||||||
mainText = get_message('Title')
|
mainText = get_message('Title')
|
||||||
|
|
||||||
def resetValues(title, button, command, rangeKey, message = ''):
|
def resetValues(title, button, command, rangeKey):
|
||||||
paramToSend = ""
|
paramToSend = ""
|
||||||
params = getValuesToChange(title)
|
params = getValuesToChange(title)
|
||||||
|
|
||||||
@ -286,7 +293,7 @@ def run( elm, ecu, command, data ):
|
|||||||
|
|
||||||
clearScreen()
|
clearScreen()
|
||||||
|
|
||||||
if not params:
|
if not params: #VP042 for INLET_FLAP
|
||||||
print
|
print
|
||||||
response = ecu.run_cmd(command)
|
response = ecu.run_cmd(command)
|
||||||
print
|
print
|
||||||
@ -307,11 +314,11 @@ def run( elm, ecu, command, data ):
|
|||||||
identsList[k] = v
|
identsList[k] = v
|
||||||
|
|
||||||
for idKey in range(idRangeKey['begin'], idRangeKey['end'] + 1):
|
for idKey in range(idRangeKey['begin'], idRangeKey['end'] + 1):
|
||||||
print str(idKey), identsList["D" + str(idKey)]
|
# print str(idKey), identsList["D" + str(idKey)]
|
||||||
if identsList["D" + str(idKey)].startswith("ID"):
|
if identsList["D" + str(idKey)].startswith("ID"):
|
||||||
identsList["D" + str(idKey)] = ecu.get_id(identsList["D" + str(idKey)], 1)
|
identsList["D" + str(idKey)] = ecu.get_id(identsList["D" + str(idKey)], 1)
|
||||||
paramToSend += identsList["D" + str(idKey)]
|
paramToSend += identsList["D" + str(idKey)]
|
||||||
print str(idKey), identsList["D" + str(idKey)]
|
# print str(idKey), identsList["D" + str(idKey)]
|
||||||
|
|
||||||
print
|
print
|
||||||
response = ecu.run_cmd(command,paramToSend)
|
response = ecu.run_cmd(command,paramToSend)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user