Jump to content
The simFlight Network Forums

737NGX offsets


Recommended Posts

Hi

I am new to LUA and below is my first simple program. It should test several 737NGX annunciation flags to control the LEDs of the second RP48. A simple RP48 LED flash test program did work. But I fight with the offsets. I did set the EnableDataBroadcast=1 and tested the Re-simconnect trick but nothing flashs.

I am getting out of ideas what to do next. I appreciate your support very much.

My LUA script:

--Begin

model = GFRP48 -- GoFlight model number

unit = 1 -- Sets the Variable Device "unit" to GFRP48 174: 0; 175: 1?

MCLED = 0 -- Init LED Numbers

APLED = 1

ATLED = 2

FMCLED = 3

-- Function Master Cautionto light on/off

function MasterCaution(offset,value)

if value ~= 0 then

gfd.SetLight(model,unit,MCLED) -- Turn RP48 2 MCLED ON

else

gfd.ClearLight(model,unit,MCLED) -- Turn RP48 2 MCLED OFF

end

end

-- Function AP Cautionto light on/off

function APCaution(offset,value)

if value ~= 0 then

gfd.SetLight(model,unit,APLED) -- Turn RP48 2 APLED ON

else

gfd.ClearLight(model,unit,APLED) -- Turn RP48 2 APLED OFF

end

end

-- Function AT Cautionto light on/off

function ATCaution(offset,value)

if value ~= 0 then

gfd.SetLight(model,unit,ATLED) -- Turn RP48 3 ATLED ON

else

gfd.ClearLight(model,unit,ATLED) -- Turn RP48 3 ATLED OFF

end

end

-- Function FMC Cautionto light on/off

function FMCCaution(offset,value)

if value ~= 0 then

gfd.SetLight(model,unit,FMCLED) -- Turn RP48 2 FMCLED ON

else

gfd.ClearLight(model,unit,FMCLED) -- Turn RP48 2 FMCLED OFF

end

end

-- Main program

gfd.SetBright(model, unit, 15) -- Sets the Brightness of Unit#1 on the GFP8 to 15 (full).

event.offset(0x6506, "UW","MasterCaution")

event.offset(0x6550, "UW","APCaution")

event.offset(0x6552, "UW","ATCaution")

event.offset(0x6554, "UW","FMCCaution")

--END

Thank you for help and bregards

Guido

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.