This commit is contained in:
rusefillc 2022-09-09 22:01:11 -04:00
parent 3e9f8fe5cc
commit f94d7ca78f
1 changed files with 6 additions and 0 deletions

View File

@ -198,6 +198,8 @@ end
STARTER_OUTPUT_INDEX = 0
startPwm(STARTER_OUTPUT_INDEX, 100, 0)
-- 201
ECMEngineStatus = 0xC9
IGN_STATUS = 0x1f1
-- 0x514
VIN_Part1 = 1300
@ -217,11 +219,15 @@ canRxAdd(IGN_STATUS, canIgnStatus)
-- todo: take VIN from configuration? encode VIN?
canVin1 = { 0x47, 0x4E, 0x4C, 0x43, 0x32, 0x45, 0x30, 0x34 }
canVin2 = { 0x42, 0x52, 0x32, 0x31, 0x36, 0x33, 0x36, 0x36 }
dataECMEngineStatus = { 0x84, 0x09, 0x99, 0x0A, 0x00, 0x40, 0x08, 0x00 }
function onTick()
txCan(1, VIN_Part1, 0, canVin1)
txCan(1, VIN_Part2, 0, canVin2)
-- good enough for fuel module!
txCan(1, ECMEngineStatus, 0, dataECMEngineStatus)
if isCranking then
setPwmDuty(STARTER_OUTPUT_INDEX, 1)
else