SSPP scenario lang encoding fixes
This commit is contained in:
parent
bdc7bb254e
commit
8a2ff1b93e
@ -137,15 +137,15 @@ def run( elm, ecu, command, data ):
|
|||||||
}
|
}
|
||||||
|
|
||||||
searchInProgress = []
|
searchInProgress = []
|
||||||
searchInProgress.append(get_message('Label_AVG_En_Cours', False))
|
searchInProgress.append(get_message('Label_AVG_En_Cours'))
|
||||||
searchInProgress.append(get_message('Label_AVD_En_Cours', False))
|
searchInProgress.append(get_message('Label_AVD_En_Cours'))
|
||||||
searchInProgress.append(get_message('Label_ARD_En_Cours', False))
|
searchInProgress.append(get_message('Label_ARD_En_Cours'))
|
||||||
searchInProgress.append(get_message('Label_ARG_En_Cours', False))
|
searchInProgress.append(get_message('Label_ARG_En_Cours'))
|
||||||
searchFinished = []
|
searchFinished = []
|
||||||
searchFinished.append(get_message('Label_AVG_Terminee', False))
|
searchFinished.append(get_message('Label_AVG_Terminee'))
|
||||||
searchFinished.append(get_message('Label_AVD_Terminee', False))
|
searchFinished.append(get_message('Label_AVD_Terminee'))
|
||||||
searchFinished.append(get_message('Label_ARD_Terminee', False))
|
searchFinished.append(get_message('Label_ARD_Terminee'))
|
||||||
searchFinished.append(get_message('Label_ARG_Terminee', False))
|
searchFinished.append(get_message('Label_ARG_Terminee'))
|
||||||
summerFLCode = ecu.get_id(ScmParam['ID_AVG_ETE'], 1)
|
summerFLCode = ecu.get_id(ScmParam['ID_AVG_ETE'], 1)
|
||||||
summerFRCode = ecu.get_id(ScmParam['ID_AVD_ETE'], 1)
|
summerFRCode = ecu.get_id(ScmParam['ID_AVD_ETE'], 1)
|
||||||
summerRRCode = ecu.get_id(ScmParam['ID_ARD_ETE'], 1)
|
summerRRCode = ecu.get_id(ScmParam['ID_ARD_ETE'], 1)
|
||||||
@ -272,13 +272,13 @@ def run( elm, ecu, command, data ):
|
|||||||
selectedValve = valveLabelsDict[key]
|
selectedValve = valveLabelsDict[key]
|
||||||
selectedValveKey = key
|
selectedValveKey = key
|
||||||
|
|
||||||
userCode = raw_input(selectedValve + ': ').upper()
|
userCode = raw_input(pyren_encode(selectedValve) + ': ').upper()
|
||||||
while not len(userCode) == 6 or not all(c in string.hexdigits for c in userCode):
|
while not len(userCode) == 6 or not all(c in string.hexdigits for c in userCode):
|
||||||
if not len(userCode) == 6:
|
if not len(userCode) == 6:
|
||||||
print 'Valve code should be 6 characters long.'
|
print 'Valve code should be 6 characters long.'
|
||||||
else:
|
else:
|
||||||
print 'Illegal characters in the valve code'
|
print 'Illegal characters in the valve code'
|
||||||
userCode = raw_input(selectedValve + ': ').upper()
|
userCode = raw_input(pyren_encode(selectedValve) + ': ').upper()
|
||||||
|
|
||||||
paramToSend = ''
|
paramToSend = ''
|
||||||
if summerTyresSet:
|
if summerTyresSet:
|
||||||
@ -297,7 +297,7 @@ def run( elm, ecu, command, data ):
|
|||||||
clearScreen()
|
clearScreen()
|
||||||
print screen
|
print screen
|
||||||
print
|
print
|
||||||
print tyreCodesTable[selectedValveKey], userCode
|
print pyren_encode(tyreCodesTable[selectedValveKey]), userCode
|
||||||
print
|
print
|
||||||
writeCodes(paramToSend)
|
writeCodes(paramToSend)
|
||||||
|
|
||||||
@ -358,11 +358,11 @@ def run( elm, ecu, command, data ):
|
|||||||
print '*'*80
|
print '*'*80
|
||||||
|
|
||||||
if pyren_encode(value2) == pyren_encode(mod_globals.language_dict[ScmParam['StateNO']]) and len(readCodes) < 4:
|
if pyren_encode(value2) == pyren_encode(mod_globals.language_dict[ScmParam['StateNO']]) and len(readCodes) < 4:
|
||||||
print "%-50s %-20s"%(readCodeMessage, readCode)
|
print "%-50s %-20s"%(readCodeMessage, pyren_encode(readCode))
|
||||||
print
|
print
|
||||||
print "No codes read"
|
print "No codes read"
|
||||||
elif pyren_encode(value2) == pyren_encode(mod_globals.language_dict[ScmParam['StateYES']]) and len(readCodes) < 4:
|
elif pyren_encode(value2) == pyren_encode(mod_globals.language_dict[ScmParam['StateYES']]) and len(readCodes) < 4:
|
||||||
print "%-50s %-20s"%(readCodeMessage, readCode)
|
print "%-50s %-20s"%(readCodeMessage, pyren_encode(readCode))
|
||||||
print
|
print
|
||||||
|
|
||||||
if readCode != '000000' and readCode not in readCodes.keys():
|
if readCode != '000000' and readCode not in readCodes.keys():
|
||||||
@ -378,7 +378,7 @@ def run( elm, ecu, command, data ):
|
|||||||
print
|
print
|
||||||
|
|
||||||
for code in range(len(readCodes)):
|
for code in range(len(readCodes)):
|
||||||
print "%-60s %-8s"%(searchFinished[code], readCodes[readCodes.keys()[code]])
|
print "%-60s %-8s"%(searchFinished[code], pyren_encode(readCodes[readCodes.keys()[code]]))
|
||||||
|
|
||||||
print '*'*80
|
print '*'*80
|
||||||
print
|
print
|
||||||
|
Loading…
x
Reference in New Issue
Block a user