Removed lock in ascii mode

This commit is contained in:
Marianpol 2020-05-15 09:37:06 +02:00
parent ca373640b9
commit cd2924d4e1
4 changed files with 6 additions and 4 deletions

View File

@ -62,6 +62,7 @@ if __name__ == "__main__":
zf.writestr (os.path.join ("EcuRenault", os.path.basename (vf)), str (data))
for vf in fbsessionfiles:
vf = vf[:-4] + vf[-4:].lower()
print "Processing file ", vf
f = open (vf, "r")
data = f.read ()
@ -81,6 +82,7 @@ if __name__ == "__main__":
os.path.basename (vf).replace (".bqm", ".p")), str (data))
for vf in fgsessionfiles:
vf = vf[:-4] + vf[-4:].lower()
print "Processing file ", vf
try:
while len(vf) and vf[0] in ['.', '/', '\\']:

View File

@ -87,7 +87,7 @@ def runCommand( command, ecu, elm, param = '', cmdt = 'HEX' ):
# continue
if parsize>0 and len(chosenParameter)<parsize*2:
chosenParameter = '0'*(parsize*2 - len(chosenParameter)) + chosenParameter
if cmdt=='ASCII' and ('0' not in ch) and ('9' not in ch) and ('J' not in ch):
if cmdt=='ASCII':
chosenParameter = ASCIITOHEX( ch )
#if parsize > 0 and len(chosenParameter) > parsize * 2:
# print 'Too long value'
@ -346,7 +346,7 @@ def executeCommand( command, ecu, elm, path ):
if parsize > 0 and len(chosenParameter)<parsize*2:
chosenParameter = '0'*(parsize*2 - len(chosenParameter)) + chosenParameter
break
if cmdt=='ASCII' and ('0' not in ch) and ('9' not in ch) and ('J' not in ch):
if cmdt=='ASCII':
chosenParameter = ASCIITOHEX( ch )
if parsize > 0 and len(chosenParameter) > parsize * 2:
print 'Too long value'

View File

@ -602,7 +602,7 @@ class ScanEcus:
def chooseModel(self, num):
orderBy = 1 # 0 = vehiclename
orderBy = 0 # 0 = vehiclename
# 1 = file
# 2 = vehTypeCode
# 3 = vehTCOM

View File

@ -336,7 +336,7 @@ if __name__ == "__main__":
def ASCIITOHEX( ATH ):
ATH = ATH.upper()
hexATH = ''.join("{:02x}".format(ord(c)) for c in ATH)
hexATH = ''.join("{:02X}".format(ord(c)) for c in ATH)
#Result
return hexATH