diff --git a/pyren3/bus_monitor.py b/pyren3/bus_monitor.py index 7563f57..0646080 100644 --- a/pyren3/bus_monitor.py +++ b/pyren3/bus_monitor.py @@ -345,7 +345,7 @@ def optParser(): action="store_true") options = parser.parse_args() - + if options.outfile=='' and not options.port and mod_globals.os != 'android': parser.print_help() iterator = sorted(list(list_ports.comports())) diff --git a/pyren3/macro/koleos2/Cornering_Inh_OnOff.cmd b/pyren3/macro/koleos2/Cornering_Inh_OnOff.cmd new file mode 100644 index 0000000..9483f8b --- /dev/null +++ b/pyren3/macro/koleos2/Cornering_Inh_OnOff.cmd @@ -0,0 +1,15 @@ +# Cornering_Inhibition ON/OFF + +$addr = 27 + +can500 # init can macro + +delay 1 + +# open session + +session 10C0 + +# configuration + +xor_bits 0425 4 4 80 80 diff --git a/pyren3/macro/koleos2/DRL_Inh_by_flasher_OnOff.cmd b/pyren3/macro/koleos2/DRL_Inh_by_flasher_OnOff.cmd new file mode 100644 index 0000000..ef2fd41 --- /dev/null +++ b/pyren3/macro/koleos2/DRL_Inh_by_flasher_OnOff.cmd @@ -0,0 +1,15 @@ +# DRLInhibitByFlasher ON/OFF + +$addr = 27 + +can500 # init can macro + +delay 1 + +# open session + +session 10C0 + +# configuration + +xor_bits 0054 4 4 80 80 diff --git a/pyren3/mod_ddt.py b/pyren3/mod_ddt.py index f97bbf3..7a2be9b 100755 --- a/pyren3/mod_ddt.py +++ b/pyren3/mod_ddt.py @@ -999,6 +999,8 @@ class DDTLauncher(): if request.SentBytes[:2] in mod_elm.AllowedList + ['17', '19']: if request.SentBytes[:2] == '19' and request.SentBytes[:2] != '1902': continue + if request.SentBytes[:2] == '22' and len(request.SentBytes) < 6: + continue v_cmd.set(request.SentBytes) e_cmd.update() v_cnt.set(str(i)+'/'+str(max)) diff --git a/pyren3/mod_ddt_ecu.py b/pyren3/mod_ddt_ecu.py index aa16bbc..f4e02a8 100644 --- a/pyren3/mod_ddt_ecu.py +++ b/pyren3/mod_ddt_ecu.py @@ -390,6 +390,8 @@ class DDTECU(): if request.SentBytes[:2] in AllowedList + ['17','19']: if request.SentBytes[:2] == '19' and request.SentBytes[:2] != '1902': continue + if request.SentBytes[:2] == '22' and len(request.SentBytes) < 6: + continue pos = chr(ord(request.SentBytes[0])+4)+request.SentBytes[1] rsp = self.elm.request(request.SentBytes, pos, False) if ':' in rsp: continue @@ -734,12 +736,13 @@ class DDTECU(): hmask = hmask[-bytes * 2:].zfill(bytes * 2) func_params = ' ' + lid + ' ' + str(rr.MinBytes) + ' ' + str(rdi.FirstByte) + ' ' + hmask + ' ' + value + '\n' + func_params_xor = ' ' + lid + ' ' + str(rr.MinBytes) + ' ' + str(rdi.FirstByte) + ' ' + hmask + ' ' + hmask + '\n' for f in ['exit_if','exit_if_not']: result += (f + func_params) if wr!=None: - for f in ['set_bits', 'xor_bits']: - result += (f + func_params) + result += ('set_bits' + func_params) + result += ('xor_bits' + func_params_xor) return result diff --git a/pyren3/mod_ecu.py b/pyren3/mod_ecu.py index 0bebcec..d819d05 100755 --- a/pyren3/mod_ecu.py +++ b/pyren3/mod_ecu.py @@ -177,6 +177,8 @@ class ECU: if service.startReq[:2] in AllowedList+['17','19']: if service.startReq[:2] == '19' and service.startReq[:4] != '1902': continue + if service.startReq[:2] == '22' and len(service.startReq) < 6: + continue pos = chr(ord(service.startReq[0])+4)+service.startReq[1] rsp = self.elm.request(service.startReq, pos, False) if ':' in rsp: continue