fix acf in connected mode
This commit is contained in:
parent
4a983a6771
commit
137de46ff1
@ -272,7 +272,10 @@ def main():
|
||||
ent['vehTypeCode'] = platform
|
||||
ent['startDiagReq'] = ''
|
||||
for a in pl_id[platform][bus_brp][idf]:
|
||||
ent['dst'],ent['idRx'],ent['idTx'],starts = a.split('#')
|
||||
if ent['pin'] == 'iso':
|
||||
ent['dst'] = a.split('#')[0]
|
||||
else:
|
||||
ent['dst'],ent['idRx'],ent['idTx'],starts = a.split('#')
|
||||
if ent['startDiagReq'] == '':
|
||||
ent['startDiagReq'] = starts
|
||||
else:
|
||||
|
@ -46,9 +46,15 @@ def get_alternative_refs( platform ):
|
||||
idf,refPair = aref.split(':')
|
||||
res[idf] = refPair
|
||||
continue
|
||||
idf,ref1 = aref.split(':')
|
||||
if ':' in aref:
|
||||
idf,ref1 = aref.split(':')
|
||||
else:
|
||||
print("ERROR in --ref option. ECU family not defined (" + aref + ")" )
|
||||
continue
|
||||
if len(ref1)==10:
|
||||
alt[aref] = {}
|
||||
else:
|
||||
print("ERROR. Wrong --ref option", aref )
|
||||
|
||||
#find in REF.DAT
|
||||
try:
|
||||
@ -154,6 +160,9 @@ def acf_loadModules( de, refdata, platform ):
|
||||
m['sref'] = ref2
|
||||
m['mo']=''
|
||||
m['dst'] = ''
|
||||
m['pin'] = 'undef'
|
||||
m['idRx'] = ''
|
||||
m['idTx'] = ''
|
||||
m['ecuname'] = ''
|
||||
m['startDiagReq'] = '10C0'
|
||||
if ref2 + '.dat' in zipflist:
|
||||
|
10
pyren3/mod_ecu_scenario.py
Executable file → Normal file
10
pyren3/mod_ecu_scenario.py
Executable file → Normal file
@ -17,7 +17,7 @@ def playScenario(command, ecu, elm):
|
||||
path = "EcuRenault/Scenarios/"
|
||||
scenarioName,scenarioData = command.scenario.split('#')
|
||||
|
||||
scenarioData = scenarioData.upper()[:-4]+'.xml'
|
||||
scenarioData = scenarioData[:-4]+'.xml'
|
||||
|
||||
showable = False
|
||||
if scenarioName.lower().startswith('scm'):
|
||||
@ -48,10 +48,14 @@ def playScenario(command, ecu, elm):
|
||||
|
||||
if not mod_db_manager.file_in_clip(os.path.join(path,scenarioData)):
|
||||
return
|
||||
|
||||
lines = [line.rstrip('\n') for line in mod_db_manager.get_file_from_clip(os.path.join(path,scenarioData))]
|
||||
|
||||
scenFile = mod_db_manager.get_file_from_clip(os.path.join(path,scenarioData)).read()
|
||||
if isinstance(scenFile, (bytes, bytearray)):
|
||||
scenFile = scenFile.decode("utf-8", errors='ignore')
|
||||
lines = scenFile.split('\n')
|
||||
|
||||
for l in lines:
|
||||
l = l.rstrip('\r')
|
||||
pa = re.compile(r'name=\"(\w+)\"\s+value=\"(\w+)\"')
|
||||
ma = pa.search( l )
|
||||
if ma:
|
||||
|
Loading…
x
Reference in New Issue
Block a user