This commit is contained in:
rusefillc 2023-07-06 00:15:16 -04:00
parent 054589e403
commit c187792854
2 changed files with 12 additions and 1 deletions

View File

@ -87,6 +87,15 @@ FIXED_POINT = 128
setTickRate(2)
function onCanConfiguration3(bus, id, dlc, data)
-- print("Received configuration3 "..arrayToString(data))
pumpPeak = getTwoBytesLSB(data, 6, 1 / 128)
-- print("GDI4 says PumpPeakCurrent ".. pumpPeak)
setLuaGauge(1, pumpPeak)
end
canRxAdd(GDI4_BASE_ADDRESS + 3, onCanConfiguration3)
function onTick()
pumpPeakCurrent = getCalibration("mc33_hpfp_i_peak")

View File

@ -64,7 +64,9 @@ function onCanConfiguration3(bus, id, dlc, data)
print("GDI4 says HoldCurrent "..getTwoBytesLSB(data, 0, 1 / 128) )
print("GDI4 says TholdOff "..getTwoBytesLSB(data, 2, 1) )
print("GDI4 says THoldDuration "..getTwoBytesLSB(data, 4, 1) )
print("GDI4 says PumpPeakCurrent "..getTwoBytesLSB(data, 6, 1 / 128) )
pumpPeak = getTwoBytesLSB(data, 6, 1 / 128)
print("GDI4 says PumpPeakCurrent ".. pumpPeak)
setLuaGauge(1, pumpPeak)
end
function onCanConfiguration4(bus, id, dlc, data)