Injectors data reseting added
This commit is contained in:
parent
0ebf21501f
commit
9212bf1e66
@ -266,6 +266,41 @@ def run( elm, ecu, command, data ):
|
|||||||
mainText = get_message('Title')
|
mainText = get_message('Title')
|
||||||
inProgressMessage = get_message('CommandInProgressMessage')
|
inProgressMessage = get_message('CommandInProgressMessage')
|
||||||
|
|
||||||
|
def resetInjetorsData(button, commandsList):
|
||||||
|
injectorsInfoMessage = get_message('Message21')
|
||||||
|
response = ""
|
||||||
|
clearScreen()
|
||||||
|
|
||||||
|
print mainText
|
||||||
|
print '*'*80
|
||||||
|
print buttons[button]
|
||||||
|
print '*'*80
|
||||||
|
print injectorsInfoMessage
|
||||||
|
print '*'*80
|
||||||
|
print
|
||||||
|
|
||||||
|
ch = raw_input(confirm + ' <YES/NO>: ')
|
||||||
|
while (ch.upper()!='YES') and (ch.upper()!='NO'):
|
||||||
|
ch = raw_input(confirm + ' <YES/NO>: ')
|
||||||
|
if ch.upper()!='YES':
|
||||||
|
return
|
||||||
|
|
||||||
|
clearScreen()
|
||||||
|
|
||||||
|
print
|
||||||
|
for command in commandsList:
|
||||||
|
response += ecu.run_cmd(command)
|
||||||
|
print
|
||||||
|
|
||||||
|
if "NR" in response:
|
||||||
|
print failMessage
|
||||||
|
else:
|
||||||
|
print successMessage
|
||||||
|
|
||||||
|
print
|
||||||
|
ch = raw_input('Press ENTER to exit')
|
||||||
|
|
||||||
|
|
||||||
def setGlowPlugsType(title, button, command, rangeKey):
|
def setGlowPlugsType(title, button, command, rangeKey):
|
||||||
paramToSend = ""
|
paramToSend = ""
|
||||||
params = getValuesToChange(title)
|
params = getValuesToChange(title)
|
||||||
@ -393,6 +428,8 @@ def run( elm, ecu, command, data ):
|
|||||||
|
|
||||||
functions = OrderedDict()
|
functions = OrderedDict()
|
||||||
for cmdKey in commands.keys():
|
for cmdKey in commands.keys():
|
||||||
|
if cmdKey == 'Cmd1':
|
||||||
|
functions[1] = [1, [commands['Cmd1'],commands['Cmd2'],commands['Cmd3'],commands['Cmd4']]]
|
||||||
if cmdKey == 'Cmd5':
|
if cmdKey == 'Cmd5':
|
||||||
functions[2] = ["EGR_VALVE", 2, commands['Cmd5'], 0]
|
functions[2] = ["EGR_VALVE", 2, commands['Cmd5'], 0]
|
||||||
if cmdKey == 'Cmd6':
|
if cmdKey == 'Cmd6':
|
||||||
@ -410,7 +447,7 @@ def run( elm, ecu, command, data ):
|
|||||||
print infoMessage
|
print infoMessage
|
||||||
print
|
print
|
||||||
|
|
||||||
notSupported =[1,6,7]
|
notSupported = [6,7]
|
||||||
|
|
||||||
choice = Choice(buttons.values(), "Choose :")
|
choice = Choice(buttons.values(), "Choose :")
|
||||||
|
|
||||||
@ -420,7 +457,9 @@ def run( elm, ecu, command, data ):
|
|||||||
if key in notSupported:
|
if key in notSupported:
|
||||||
ch = raw_input("\nNot Supported yet. Press ENTER to exit")
|
ch = raw_input("\nNot Supported yet. Press ENTER to exit")
|
||||||
return
|
return
|
||||||
if key == 8:
|
if key == 1:
|
||||||
|
resetInjetorsData(functions[key][0],functions[key][1])
|
||||||
|
elif key == 8:
|
||||||
setGlowPlugsType(functions[key][0],functions[key][1],functions[key][2],functions[key][3])
|
setGlowPlugsType(functions[key][0],functions[key][1],functions[key][2],functions[key][3])
|
||||||
else:
|
else:
|
||||||
resetValues(functions[key][0],functions[key][1],functions[key][2],functions[key][3])
|
resetValues(functions[key][0],functions[key][1],functions[key][2],functions[key][3])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user