fix for short 22xx commands, fix macro suggest

This commit is contained in:
shrlnm 2023-11-26 21:07:44 +03:00
parent 3e1e53233d
commit 453982d474
6 changed files with 40 additions and 3 deletions

View 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

View 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

View File

@ -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))

View File

@ -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

View File

@ -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