fix SAUF operand processing and allvins

This commit is contained in:
shrlnm 2023-03-08 16:11:17 +03:00
parent a5f2720497
commit 7238ea11d6
3 changed files with 14 additions and 7 deletions

View File

@ -169,7 +169,7 @@ def acf_MTC_generateDefaults( m, mtc ):
# write trailer
sf.write('\n# VIN programming !!!check the command!!!\n')
sf.write('#2EF190' + hex_VIN_plus_CRC(mod_globals.vin, False) +'\n')
sf.write('#3B81' + hex_VIN_plus_CRC(mod_globals.vin, False) +'\n')
sf.write('#3B81' + hex_VIN_plus_CRC(mod_globals.vin, True) +'\n')
sf.write('\n# reset ecu or disconnect the battary!!!check the command!!!\n')
sf.write('#1101\n\n')
sf.write('exit\n')
@ -255,7 +255,8 @@ def acf_MTC_optinInfluence( m, option ):
res = acf_MTC_compare(op.MTC, option)
if res:
tmpMTC = op.MTC.split()
if len(tmpMTC)==2 and tmpMTC[0]=='SAUF' and tmpMTC[1]!=option: continue
if op.MTC.startswith('SAUF'): continue
#if len(tmpMTC)==2 and tmpMTC[0]=='SAUF' and tmpMTC[1]!=option: continue
out = out + '%-100s;%-30s;%-10s;%s\n'%(cu.DI, op.MTC, op.VW, op.TEX)
#out = out + '%-100s;%-30s;%-10s;%s\n'%(cu.TE, op.MTC, op.VW, op.TEX)
#break

View File

@ -397,10 +397,16 @@ class ECU:
nparams = 0
for dr in datarefs:
if dr.type=='State':
csvline += ";" + self.States[dr.name].codeMR + ":" + self.States[dr.name].label
if mod_globals.opt_csv_only:
csvline += ";" + self.States[dr.name].codeMR
else:
csvline += ";" + self.States[dr.name].codeMR + ":" + self.States[dr.name].label
nparams += 1
if dr.type=='Parameter':
csvline += (";" + self.Parameters[dr.name].codeMR + ":" +self.Parameters[dr.name].label + " [" + self.Parameters[dr.name].unit + "]")
if mod_globals.opt_csv_only:
csvline += ";" + self.Parameters[dr.name].codeMR
else:
csvline += (";" + self.Parameters[dr.name].codeMR + ":" +self.Parameters[dr.name].label + " [" + self.Parameters[dr.name].unit + "]")
nparams += 1
if mod_globals.opt_usrkey: csvline += ";User events"
csvline = pyren_encode(csvline)

View File

@ -104,7 +104,7 @@ def acf_buildFull( platf ):
VIN2 = i.split('.')[0]
print(' '+VIN2)
zf=zip.open(i)
vin3list=str(zf.read())
vin3list=zf.read().decode("utf-8")
zf.close()
for l in vin3list.split('\n'):
l = l.strip()
@ -241,9 +241,9 @@ def acf_MTC_finde( mtc_tag, mtc ):
mtc_tag = mtc_tag.strip()
if mtc_tag.startswith('SAUF '):
if mtc_tag.startswith('SAUF'):
sauf = True
mtc_tag = mtc_tag[5:]
mtc_tag = mtc_tag[4:].strip()
if mtc_tag in mtc:
#if mtc_tag==mtc: