codes were erased!
This commit is contained in:
parent
d16011ebcf
commit
8aeb6dd183
|
@ -97,6 +97,12 @@ function requestErrorCodes()
|
||||||
print("Requesting error codes " .. arrayToString(out))
|
print("Requesting error codes " .. arrayToString(out))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function requestEraseCodes()
|
||||||
|
out = { nextReq(), 00, 0x03, 0x14, 0xFF, 0x00 }
|
||||||
|
print("Request Code Erase")
|
||||||
|
txCan(1, cuId, 0, out)
|
||||||
|
end
|
||||||
|
|
||||||
function onCanTester(bus, id, dlc, data)
|
function onCanTester(bus, id, dlc, data)
|
||||||
-- here we handle 300 packets
|
-- here we handle 300 packets
|
||||||
|
|
||||||
|
@ -112,8 +118,11 @@ function onCanTester(bus, id, dlc, data)
|
||||||
groupIndex = 1
|
groupIndex = 1
|
||||||
end
|
end
|
||||||
groupId = groups[groupIndex]
|
groupId = groups[groupIndex]
|
||||||
print ("KA " .. groupIndex .." " ..groupId)
|
print ("KA codes " .. withErrorCodes)
|
||||||
|
|
||||||
|
if withErrorCodes > 0 then
|
||||||
|
requestEraseCodes()
|
||||||
|
end
|
||||||
|
|
||||||
-- reqFirst = nextReq
|
-- reqFirst = nextReq
|
||||||
--print("Requesting next group " ..groupId .." with counter " ..sendCounter)
|
--print("Requesting next group " ..groupId .." with counter " ..sendCounter)
|
||||||
|
@ -171,11 +180,6 @@ function onCanTester(bus, id, dlc, data)
|
||||||
print("HAVE CODES " .. len)
|
print("HAVE CODES " .. len)
|
||||||
withErrorCodes = 1
|
withErrorCodes = 1
|
||||||
|
|
||||||
-- out = { nextReq(), 00, 0x03, 0x14, 0xFF, 0x00 }
|
|
||||||
--print("Request Code Erase")
|
|
||||||
-- txCan(1, cuId, 0, out)
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue