Fix#2
This commit is contained in:
parent
64fc845473
commit
bf380daa22
@ -169,19 +169,19 @@ def run( elm, ecu, command, data ):
|
|||||||
if ecuSet.ncalib:
|
if ecuSet.ncalib:
|
||||||
value2, datastr2 = ecu.get_id(ScmParam['Ncalib'])
|
value2, datastr2 = ecu.get_id(ScmParam['Ncalib'])
|
||||||
if ecuSet.ncalib == value2.upper():
|
if ecuSet.ncalib == value2.upper():
|
||||||
print datastr1
|
# print datastr1
|
||||||
print datastr2
|
# print datastr2
|
||||||
correctEcu = ecuSet
|
correctEcu = ecuSet
|
||||||
break
|
break
|
||||||
elif ecuSet.ncalib == "Other":
|
elif ecuSet.ncalib == "Other":
|
||||||
print datastr1
|
# print datastr1
|
||||||
print ecuSet.ncalib
|
# print ecuSet.ncalib
|
||||||
correctEcu = ecuSet
|
correctEcu = ecuSet
|
||||||
else:
|
else:
|
||||||
print datastr1
|
# print datastr1
|
||||||
correctEcu = ecuSet
|
correctEcu = ecuSet
|
||||||
else:
|
else:
|
||||||
print datastr1
|
# print datastr1
|
||||||
correctEcu = ecuSet
|
correctEcu = ecuSet
|
||||||
else:
|
else:
|
||||||
correctEcu = ecusList[0]
|
correctEcu = ecusList[0]
|
||||||
@ -209,12 +209,7 @@ def run( elm, ecu, command, data ):
|
|||||||
if str(correctEcu.buttons[l]) == 'true':
|
if str(correctEcu.buttons[l]) == 'true':
|
||||||
buttons[l.strip('Button')] = get_message(l[:-6] + "Text")
|
buttons[l.strip('Button')] = get_message(l[:-6] + "Text")
|
||||||
|
|
||||||
commands = {}
|
identsList = OrderedDict()
|
||||||
for child in root:
|
|
||||||
if child.attrib["name"] == "Commands":
|
|
||||||
if len(child.keys()) == 1:
|
|
||||||
for param in child:
|
|
||||||
commands[param.attrib["name"]] = param.attrib["value"]
|
|
||||||
|
|
||||||
def getIdents(start, end):
|
def getIdents(start, end):
|
||||||
identsDict = OrderedDict()
|
identsDict = OrderedDict()
|
||||||
@ -222,8 +217,6 @@ def run( elm, ecu, command, data ):
|
|||||||
identsDict['D'+str(idnum)] = ScmParam['Ident'+str(idnum)]
|
identsDict['D'+str(idnum)] = ScmParam['Ident'+str(idnum)]
|
||||||
return identsDict
|
return identsDict
|
||||||
|
|
||||||
identsList = OrderedDict()
|
|
||||||
|
|
||||||
for param in ScmParam.keys():
|
for param in ScmParam.keys():
|
||||||
if param.startswith('Idents') and param.endswith('Begin'):
|
if param.startswith('Idents') and param.endswith('Begin'):
|
||||||
key = param[6:-5]
|
key = param[6:-5]
|
||||||
@ -231,6 +224,13 @@ def run( elm, ecu, command, data ):
|
|||||||
end = int(ScmParam['Idents'+key+'End'])
|
end = int(ScmParam['Idents'+key+'End'])
|
||||||
identsList[key] = getIdents(start, end)
|
identsList[key] = getIdents(start, end)
|
||||||
|
|
||||||
|
commands = {}
|
||||||
|
|
||||||
|
for child in root:
|
||||||
|
if child.attrib["name"] == "Commands":
|
||||||
|
if len(child.keys()) == 1:
|
||||||
|
for param in child:
|
||||||
|
commands[param.attrib["name"]] = param.attrib["value"]
|
||||||
|
|
||||||
def resetEGRValve():
|
def resetEGRValve():
|
||||||
paramToSend = ""
|
paramToSend = ""
|
||||||
@ -268,8 +268,6 @@ def run( elm, ecu, command, data ):
|
|||||||
ecu.run_cmd(commands['Cmd5'],paramToSend)
|
ecu.run_cmd(commands['Cmd5'],paramToSend)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
functions = OrderedDict()
|
functions = OrderedDict()
|
||||||
functions[2] = resetEGRValve
|
functions[2] = resetEGRValve
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user