Jump to content

Lua function names


stinger2k2

Recommended Posts

Hi all,

 

I am trying to write some lua code to operate the emergency lights switch of my Carenado Phenom 300. Using LINDA i have extracted the following Lvar.....ASD_SWITCH_EMER_LIGHT_EMB500

 

Can i derive the function name from this Lvar or do i need to source it elsewhere?

 

Thanks

Stinger

 

Sent from my MZ604 using Tapatalk

Link to comment
Share on other sites

Using LINDA i have extracted the following Lvar.....ASD_SWITCH_EMER_LIGHT_EMB500

 

Can i derive the function name from this Lvar or do i need to source it elsewhere?

 

There is no 'function name', you will need to manipulate the Lvar, which is just a variable, to give the desired effect. There is no guarantee that it will be possible as it depends on the implementation. To proceed, you need to watch the contents of the Lvar in LINDA when you manipulate the light switch in the virtual cockpit. If you're lucky, it might vary between, say, 1 and 0 to reflect the position of the switch. And if your luck holds, poking 1 or 0 into it will flip the switch. You can try that in the LINDA Tracer too. If it works, you will need to use a line of code like this to do it from a Lua program:

 

ipc.writeLvar("L:ASD_SWITCH_EMER_LIGHT_EMB500", 1)

MarkH

 

C0TtlQd.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Sorted !! I now have a fully working overhead panel for my Phenom. The taxi lights turned out to be the trickiest part because Carenado had used two different addresses, One for the switch operation and one for actual light operation and because it is a 3 position switch which also operates the landing lights it was a bit tricky.

 

On to the next bit now.....the autoplilot module ! ( I say module because I am building my cockpit to be put away after use so it will be in modules)

 

cheers

Stinger

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...