Using LINDA to Interface with the MJC8400
I wanted to take a moment to give back a little to this community. I'm currently building my own Q400 cockpit and while I'm certainly not an expert in building, I'm definitely not an expert in programming - but I'd like to share a couple things that I've learned about interfacing with the MJC84. I wish this information had been handy when I was building so I'd like to put it out there for others who may be contemplating building a Q400 sim.
I won't go into too much discussion on how to use the program, but I'm using LINDA to program my inputs in conjunction with Leo Bodnar BU0836X boards and BBI-64 Boards. Just a quick note - you can use LINDA to interface your joystick/yoke/throttle quadrant buttons to the MJC84.
First - download LINDA: https://www.avsim.com/forums/topic/573578-linda-326-p3dv5fsuipc6-compatible-17-aug-2020/
Next - download and install the MJC84 LINDA profile: https://www.avsim.com/forums/topic/406320-majestic-dash-8-q-400-module-26/
This profile was last updated in 2018 and includes most but definitely not all inputs into the Q400. I'd assume this project is mostly dead, which is a shame, but it still works great in LINDA.
For me, I recently completed building a UNS-1 to go along with my Q400 home cockpit: https://imgur.com/P6DDWVx
Interfacing posed a problem because in the LINDA profile, there were no inputs for the FMS keys written so I had to figure out how to program them. I read and re-read the documentation provided by Majestic and I just couldn't come up with a good way to interface the FMS buttons - just not a programmer and don't have a programmers brain. After exchanging a few emails with Support, I was reminded that I could interface the FMS buttons through Lvars, which is what LINDA uses. So I went through the MJC84 code for LINDA and was able to reverse-engineer inputs. This should work for every input listed in VariablesMap.xlsx in the mjc8q400/doc/ExtInterfaces folder.
So, to program the "ON/OFF/DIM" button in LINDA, here's what we need to do:
First, open LINDA, select the Majestic Dash 8 Q-400 profile at the top. Hit edit, then in the new window that pops up hit "Edit User" at the bottom. This file allows you to add your own inputs without disturbing the main profile.
We're going to be working mainly with this phrase:
function name_your_input_here ()
So, first name whatever button you're going to trying to program. Can be anything, but it's helpful to name it after the button your programming. In our case, lets name it FMS_KEY_ONOFF.
Now, go to VariablesMap.xlsx found in mjc8q400/doc/ExtInterfaces folder. Go to the FMC tab at the bottom. The second input down is listed as:
In the description for that variable, you'll see the list of each key and it's corresponding signal for that key:
For the ON/OFF/DIM switch, it's 242.
Last step is getting the resulting CRC.
Go to mjc8q400\doc\ExtInterfaces\XML and find IntVarCRCGen.exe
In the text field, we're going to paste the variable name, in this case it's FMC_->FMC.eventState.key_press_input and get our CRC, which is 79415
So our code to write into LINDA would be
function FMS_KEY_ONOFF ()
Similarly, if you wanted to program the TCS Button this way it would look like this:
function TCS_Button ()
The test position on the Anti-Skid switch:
function GL_AntiSkid_TEST ()
And so on...
Once your input is programmed, you can go into the joysticks section of LINDA and start assigning these inputs to buttons on your joystick. I have my entire overhead panel, pedestal panel and now my FMS interfaced through LINDA and it's working great. It's a fantastic method until MJC's COCKPIT edition comes out and lets us program these buttons through their native software.
This post may be obvious and a waste of time to some people, but I certainly didn't understand how to do it so if I help just one person, it'll be worth it.
Pics of my setup just for fun:
Next up I'm working on the ARCDU, the WX Radar panel, the AHRS slew panel and starting to introduce backlighting into my build.