Hi Pete,
I tested it and I'm still having problems. My code is below. Any suggestions? When I push the button I can see the 0B54 offset changing value using FSInterrogate and the light on the cockpit works, so the button is ok.
As always, thanks for your help.
---------------------------------------------
-- monitor APU status and turn LED on if ON
function APU(offset, value)
model = GFP8
unit = 0
id = 1
gfd.SetBright(model, unit, 15)
if value > 99 then
gfd.SetLight(model, unit, id)
else
gfd.ClearLight(model, unit, id)
end
end
event.offset("0B54", "FLT", "APU")
---------------------------------------------
The Pushback works properly, here is my code:
-- Pushback button GFP8 UNIT 0
function PushBack(offset, value)
model = GFP8
unit = 0
id = 7
gfd.SetBright(model, unit, 15)
if value == 0 then
gfd.SetLight(model, unit, id)
else
gfd.ClearLight(model, unit, id)
end
end
function SetPushBack(model, unit)
gfd.GetValues(model, unit)
if gfd.TestButton(7) then
ipc.writeUB("31F4",0)
else
ipc.writeUB("31F4",3)
end
end
event.offset("31F0", "UB", "PushBack")
event.gfd(GFP8, 0, "SetPushBack")