i will check tomorrow
and record a log with a disabled pin PC6
somting happen hear
How ?
If I make IAT fuel multipler 1 AFR go to 20+ ...OrchardPerformance wrote: ↑Tue Sep 21, 2021 2:09 amSome general tuning comments:
Tcharge should probably set to the basic RPM+TPS mode for now.
Coolant fuel multiplier curve is quite extreme. Try setting it to a smooth slope that has zero correction by 50 deg C.
IAT fuel multipler is wrong, set it to flat 1 for now as 1.2 is giving 20% extra fuel at all times.
You can probably turn multi spark off for now while we try to troubleshoot the issues you are having, the fewer advanced features turned on right now the easier it's going to be to sort this out.
Today we have https://rusefi.com/online/view.php?msq=663&dialog=triggerConfiguration_IOA work-around could be to simply change "VVT sync edge" from falling to raising - this would move cam sync away from trigger sync
2022-10-18_17_43_06_141: EngineState: LUA: onMotor3 0 58 0 7B 20 0 0 E
2022-10-18_17_43_06_141: EngineState: LUA: pps 0.0000000 tps 5.5999999 iat 18.0000000
2022-10-18_17_43_06_141: EngineState: LUA: onMotor1 1 1F 12 C 1F 0 15 1F
2022-10-18_17_43_06_141: EngineState: LUA: rpm 772.5000000 tps 0.0000000
2022-10-18_17_43_06_141: EngineState: LUA: onMotor3 0 58 0 7B 20 0 0 E
2022-10-18_17_43_06_141: EngineState: LUA: pps 0.0000000 tps 5.5999999 iat 18.0000000
2022-10-18_17_43_06_141: EngineState: LUA: onMotor1 1 1F 12 C 1F 0 15 1F
2022-10-18_17_43_06_141: EngineState: LUA: rpm 772.5000000 tps 0.0000000
Code: Select all
-- start of technical boring details please ignore
hexstr = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "A", "B", "C", "D", "E", "F" }
function toHexString(num)
if num == 0 then
return '0'
end
local result = ""
while num > 0 do
local n = num % 16
result = hexstr[n + 1] ..result
num = math.floor(num / 16)
end
return result
end
function arrayToString(arr)
local str = ""
local index = 1
while arr[index] ~= nil do
str = str.." "..toHexString(arr[index])
index = index + 1
end
return str
end
function getBitRange(data, bitIndex, bitWidth)
byteIndex = bitIndex >> 3
shift = bitIndex - byteIndex * 8
value = data[1 + byteIndex]
if (shift + bitWidth > 8) then
value = value + data[2 + byteIndex] * 256
end
mask = (1 << bitWidth) - 1
return (value >> shift) & mask
end
-- end of boring technical stuff
-- start of interesting VAG-specific processing
MOTOR_1 = 0x280
MOTOR_3 = 0x380
MOTOR_INFO = 0x580
MOTOR_5 = 0x480
MOTOR_6 = 0x488
MOTOR_7 = 0x588
ppsSensor = Sensor.new("AcceleratorPedal")
iatSensor = Sensor.new("Iat")
cltSensor = Sensor.new("clt")
cltSensor:setTimeout(3000)
tpsSensor = Sensor.new("Tps1")
function onMotor1(bus, id, dlc, data)
rpm = getBitRange(data, 16, 16) * 0.25
tps = getBitRange(data, 40, 8) * 0.4
print('onMotor1 ' ..arrayToString(data))
print ('rpm ' ..rpm ..' tps ' ..tps)
setLuaGauge(2, rpm)
end
function onMotor3(bus, id, dlc, data)
-- same as iatValue = data[2] * 0.75 - 48
iatValue = getBitRange(data, 8, 8) * 0.75 - 48
ppsValue = getBitRange(data, 16, 8) * 0.40
-- same as tpsValue = data[8] * 0.40
tpsValue = getBitRange(data, 56, 8) * 0.40
print('onMotor3 ' ..arrayToString(data))
print ('pps ' ..ppsValue ..' tps ' ..tpsValue ..' iat ' ..iatValue )
setLuaGauge(1, iatValue )
iatSensor : set(iatValue )
ppsSensor : set(ppsValue )
tpsSensor: set(tpsValue )
end
canRxAdd(1, MOTOR_1, onMotor1)
canRxAdd(1, MOTOR_3, onMotor3)
-- this controls onCanRx rate as well!
setTickRate(300)
function onTick()
--setLuaGauge(2, 13)
end
2022-10-19_19_55_35_476: EngineState: LUA loading script length: 1982...
2022-10-19_19_55_35_476: EngineState: LUA registered sensor of type AcceleratorPedal
2022-10-19_19_55_35_477: EngineState: LUA registered sensor of type Iat
2022-10-19_19_55_35_477: EngineState: LUA registered sensor of type Clt
2022-10-19_19_55_35_477: EngineState: LUA registered sensor of type Tps1
2022-10-19_19_55_35_477: EngineState: Added Lua CAN RX filter id 0x280 mask 0x1FFFFFFF with custom function
2022-10-19_19_55_35_477: EngineState: Added Lua CAN RX filter id 0x380 mask 0x1FFFFFFF with custom function
2022-10-19_19_55_35_478: EngineState: LUA script loaded successfully!
First steps https://github.com/rusefi/rusefi/commit/8714347f4edb9cb1e3e66762b3c3755c8882efb9
Code: Select all
2022-12-23_17_41_48_095: EngineState: LUA: Looks like payload index 0: 25 0 1A 61 2 [1 C8 0]
2022-12-23_17_41_48_096: EngineState: LUA: Looks like payload index 1: 26 [21 85 72] [16 FF 0] [60
2022-12-23_17_41_48_096: EngineState: LUA: Looks like payload index 2: 27 64 64] 25 0 0 25 0
2022-12-23_17_41_48_098: EngineState: LUA: Looks like payload index 3: 18 0 25 0 0 25 0 0
2022-12-23_18_54_03_324: EngineState: LUA: Requesting next group 4 with counter 8
2022-12-23_18_54_03_391: EngineState: LUA: Looks like payload index 0: 2D 0 1A 61 4 [1 C8 0]
2022-12-23_18_54_03_392: EngineState: LUA: Looks like payload index 1: 2E [15 5E 7E] [5 A 3B] [5
2022-12-23_18_54_03_392: EngineState: LUA: Looks like payload index 2: 2F A 7C] [?5 A 3B?] [?5 A
2022-12-23_18_54_03_393: EngineState: LUA: Looks like payload index 3: 10 BB?] [?5 A BE?] 25 0 0