Here is the code that got it working thanks to my son:)
Open up the PMDG 777 in the Linda airplane editor. This should work with all planes though.
Enter this starting with line 27... or near the top of your file.
lastUsed = 0
----------------------------------------------------------------
----------------------------------------------------------------
function incrementFastOrSlow ()
local inc = 1
local now = ipc.elapsedtime()
if now <= lastUsed + 1000 then
inc = 5
end
lastUsed = ipc.elapsedtime()
return inc
end
And then set Linda to Incfast or decfast with the encoder functions you you want to use this with.
Update both incfast and decfast lines of code to call incrementFastOrSlow()
example before:
function PMDG_AP_ALT_incfast ()
local i
for i = 1, 5 do ipc.control(71882, 256) end
PMDG_AP_ALT_show ()
end
Example after:
function PMDG_AP_ALT_incfast ()
local i
for i = 1, incrementFastOrSlow() do ipc.control(71882, 256) end
PMDG_AP_ALT_show ()
end