fix for short 22xx commands, fix macro suggest
This commit is contained in:
parent
3e1e53233d
commit
453982d474
@ -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()))
|
||||
|
15
pyren3/macro/koleos2/Cornering_Inh_OnOff.cmd
Normal file
15
pyren3/macro/koleos2/Cornering_Inh_OnOff.cmd
Normal file
@ -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
|
15
pyren3/macro/koleos2/DRL_Inh_by_flasher_OnOff.cmd
Normal file
15
pyren3/macro/koleos2/DRL_Inh_by_flasher_OnOff.cmd
Normal file
@ -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
|
@ -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))
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user