Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DA PA31 Cheyenne / Assigning Buttons via Linda

Featured Replies

Good afternoon,

 

I am currently  trying to assign certain buttons of the DA Piper Cheyenne either to a joystick/pad (regular and/or Hotas Warthog) or to my Saitek Switch Panel. What works well for most other FSX planes seems to be a problem with my favorite one.

 

At least partly:

 

For example:

Battery Master Switch: No problems

Avionics Master Switch: No Chance

 

I have used Linda and FSUIPC logs to find out what is happening:  "Toggle_Avionics_Master"  is the syntax which seems to be a standard FSX control jus as

 

- Toggle_Alternator1 resp. 2

- Toggle_elect_fuel_pump1 resp. 2

 

which I would like to assign to start the engines without using the mouse and the Head panel.

 

Unfortunately when I use Linda (which seems to be a great product) and assign "Avionics Master toggle"  from the default FSX Systems Lib I get the same logs but nothing happens with the switch in the panel. Avionics just stays dark.

 

 I have noticed that while using the Linda Tracer I can find various PA31 Lua variables, including

 

- PA31MasterAvionics

- PA31FuelPumpL

 

I have isolated the first one in the logs and could see that the status changed from 0 to 1 when I used the switch. This means that there has to be some link between "Toggle_Avionics_Master" and "PA31MasterAvionics". Therefore I have tried for hours and hours to define a function via the Linda Editor - and failed. I have done some programming before in my life and know how to use "IFs", "else" and "end" but I cannot find the correct syntax to achieve my goal.

 

Is there anybody out there who can please help me.

 

Thank you!

 

Karsten

Hello Karsten,

 

it sounds a bit difficult to learn you the LUA programming language from ground up.

Yes, there are some IFs and THENs, but each language has it's own syntax.

 

It is way over my possibilities to learn you using LUA.

 

 

I can give you some hints how to start a module, but you have also to learn and search via google etc.

Here is a thread how to start gathering LUA variables with LINDA:

 

 

 

in short words:

- open LINDA GUI, press shift+F1, the "LINDA goes huntig" page opens (and the LINDA console)

on the left side you see all LUA variables listed, which are valid for your addon

there you can click on a variable and highlight it.

Below you can "set values" (pre-filled with 0 and 1).Click at "toggle" and see what happens.

 

Similar in the middle with offsets and on the right hand with controls (there you will also find your standard FSX controls "Battery Master Switch" etc

 

- once you've found a valid LUA variable, then create a new module and have a look into existing modules.

the code for a function is then:

function P40_Battery_on ()

      ipc.writeLvar("L:Battery1Switch", 1)
      DspShow("Batt", " on ")
end

the example is the A2A P40.

"L:Battery1Switch" is the LUA variable, your's would be probably "PA31MasterAvionics" as example ("L:" is not needed)

"1" says ON, and "0" says OFF

 

"DspShow" is for the MCP Combos Display, you could delete that line also.

 

 

These are the first steps, but again, it took me years to learn about FSUIP, controls, offsets, LUA variables, LUA programming etc.

It's nothing that could be learned in a few hours.

 

And, to make things more complicated, no addon acts like an other.

It isn't sure, that "PA31MasterAvionics" does really do what it promises ... it's all about try and error!!!

Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

  • 3 months later...

Hi Karsten, any succsess? Is your project still alive?

I just figured out wich variables are needed to start the engines and switch generator on. The avionics also. (in Linda GUI tool)

 

I want to build the overhead with hardware switches.

 

Now I have to find out how to assign a keypress to the lua variable.

 

/Hendrik/

 

ps thanks Guenseli for your short discription...

 

Hi there,

I just found a problem in the Linda GUI. The Cheyenne funktions are not listed in the joystick-assignment page. In the Trace-page I was able to test the functions.

Do I have to type in the functions manualy in the editor?

 

The manual does not help in this case.

 

Any idea?

Hi Eisenapferd

 

Do you have the function file for Cheyenne loaded on you system?  If this is present you will need to select it it the aircraft drop down at the top of the LINDA window.  The Trace page only shows you the variables and lets you set/reset and trace these values.  It does not access any functions that would be contained in your aircraft function file.

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

No, I had to make a new entry and so the cheyenne has no function entrys. I just made a module file (without any docs) and it seems to work.

 

see other thread in dev.-forum.

 

/Hendrik/

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.