Joystick to SimConnect Mapping Utility - Honeycomb Bravo Throttle Mappings Included

So I have no idea why, but the heading bug “bug” of 2 degrees thing has disappeared yesterday and today. Maybe I’m going insane lol

Here some more working mappings…

AIRFRAME, PROP, CARB HEAT
SimEvent="ANTI_ICE_ON" SimVar="PANEL ANTI ICE SWITCH" ActiveState="True" 
SimEvent="ANTI_ICE_OFF" SimVar="PANEL ANTI ICE SWITCH" ActiveState="True"

SimEvent="PARKING_BRAKES" SimVar="BRAKE PARKING POSITION" ActiveState="True"
SimEvent="PARKING_BRAKES" SimVar="BRAKE PARKING POSITION" ActiveState="False"

SimEvent="FUEL_PUMP" SimVar="GENERAL ENG FUEL PUMP ON:1" ActiveState="True"
SimEvent="FUEL_PUMP" SimVar="GENERAL ENG FUEL PUMP ON:1" ActiveState="False"

SimEvent="TOGGLE_CABIN_LIGHTS" SimVar="LIGHT CABIN" ActiveState="True" 
SimEvent="TOGGLE_CABIN_LIGHTS" SimVar="LIGHT CABIN" ActiveState="False" 

SimEvent="YAW_DAMPER_ON" SimVar="AUTOPILOT YAW DAMPER" ActiveState="True"
SimEvent="YAW_DAMPER_OFF" SimVar="AUTOPILOT YAW DAMPER" ActiveState="False"

SimEvent="TOGGLE_PROPELLER_DEICE" SimVar="PROP DEICE SWITCH:1"  ActiveState="True"
SimEvent="TOGGLE_PROPELLER_DEICE" SimVar="PROP DEICE SWITCH:1" ActiveState="False"

SimEvent="TOGGLE_STRUCTURAL_DEICE" SimVar="STRUCTURAL DEICE SWITCH" ActiveState="True"
SimEvent="TOGGLE_STRUCTURAL_DEICE" SimVar="STRUCTURAL DEICE SWITCH" ActiveState="False"

SimEvent="MAGNETO_OFF" SimVar="ENG OFF MAGNETO" ActiveState="True"
SimEvent="MAGNETO_RIGHT" SimVar="ENG RIGHT MAGNETO" ActiveState="True"
SimEvent="MAGNETO_LEFT" SimVar="ENG LEFT MAGNETO" ActiveState="True"
SimEvent="MAGNETO_BOTH" SimVar="ENG BOTH MAGNETO" ActiveState="True"
SimEvent="MAGNETO_START" SimVar="GENERAL ENG STARTER ACTIVE" ActiveState="True" <--this keeps the starter in the start position until turned back to both

This will swith both alternators, instead of just engine 1
SimEvent="TOGGLE_MASTER_ALTERNATOR" SimVar="GENERAL ENG MASTER ALTERNATOR" ActiveState="True"
SimEvent="TOGGLE_MASTER_ALTERNATOR" SimVar="GENERAL ENG MASTER ALTERNATOR" ActiveState="False"

Still working of windshield deice and the avionics switches

update…

Thank you Ziesel1106!! I forgot I had you’re file

somewhat working avionics switches. The left one will actually turn on both. Seems fine in a couple other planes that just have the one master switch. From what I’ve read, there aren’t any variables for bus1 and bus2

Also needs to be on in the 152 for some reason

SimEvent="AVIONICS_MASTER_SET:1" SimVar="AVIONICS MASTER SWITCH:1" ActiveState="True"
SimEvent="AVIONICS_MASTER_SET:0" SimVar="AVIONICS MASTER SWITCH:0" ActiveState="False"

No luck on the windshield deice. Seems also to not exist.

Thanks for the detailed info - if I’m reading correctly then you’re saying that the Alpha basically works correctly now but that a few of the SimVar/SimEvent names are incorrect.

Does that sound right?

Seems to be, but that also depends in the plane. (If you’re asking about the alpha/bravo profiles working together yes they’re good) I fly prop ga aircraft the most so that’s where most of my testing was done. Jumped in a couple of jets to see what happened. In the a320 the bat switch on the alpha would need to be turned on or you couldn’t turn the battery on in sim. Or in the 152 that doesn’t even have avionics switches, it needs to be on or the radios don’t work lol. Makes sense in a way as some of the default mapping in sim are an up switch “sets” and down is not even assigned for some things, thereby not even sending an off command. Also jets have completely different variables that could be used. In the end to me it just means making multiple profiles for different aircraft if need be.

The 10 degree bug will be solved with upcoming sim update according to the developer Q&A from wednesday :slight_smile:
This can make some things easier as we can again use the in sim control mapping for functions like “battery1”, “avionics” etc. which seem to work much better with in sim configuration rather then with event mappings. Then we only need the advanced functions with event ids

To bad this great tool it is not working anymore after world update UK.
Maybe Simconnect is changed?

It’s still working fine for me…

Strange, i got disconnect, program not respons errors. But maybe it is a recent windows update or something else then. :face_with_monocle:

Edit
I Fixed it. It wasn’t your tool. I reinstall the WMR software (reverb g2) and all is good now.

Keep up your good work :+1:

I’m not a programmer but I have managed to add the latest Mobiflight commands for the FBY Airbus and recompiled it. Not sure how git hub works but if anybody needs the new .dll file which makes fs-tools compatible with more commands just inbox me.

Can someone tell me the simvar for the Sim rate and what type it is. Sim_Rate seems not to be working or at least it is not a “number”.

Kind Regards
JayDee

The SimVar is SIMULATION_RATE
The SimEvents are:
SIM_RATE
SIM_RATE_DECR
SIM_RATE_INCR

Thank a lot, and is SIMULATION_RATE a number or a enum? Do you know that too?

It’s the name of the SimConnect SimVar that returns the current value of the sim rate.
The format depends on the software that is used to interface to SimConnect. FS_Tools understands both the name as a String and as an Enum.

OK, thanks a lot

@E1ephant42 Your utility is amazing, great job. However I wans’t able to fully run it.
I trided to follow instrucitons:

  1. Installed your tool
  2. Installed MobiFlight
  3. Turn on MobiFlight beta
  4. Update
  5. Copy files to community folder (done automatically)
  6. Run tools and sim
  7. Cleaned profile for Bravo Throttle
  8. Turned on Extra profile in your tool.

And I cannot get Gramin to work.
Do I need MSFS SDK installed? Or some other files copied? Any way to debug issues?

Thank you very much for help (in advance) :slight_smile:

I suspect from reading your post that you are trying to run the full version of MobiFlight at the same time as FS_Tools. This might be causing issues. The only part of MobiFlight that you need is the WASM module.

Just make sure that the folder mobiflight-event-module is in your community folder and don’t do anything else with MobiFlight - see how that goes.

@E1ephant42 It seems that you were right - now it works! :slight_smile: great job :slight_smile:
Now I need to tune settings for both Alpha and Bravo to suit my needs :slight_smile:
All that things feel bit like in work (software dev), but here it gives way more fun :smiley:

Hello,

i am happy to found this tool !!
But i need it just to Map the Rudder Axis of my CH Pro Pedals.

Is that possible with your Tool ?

Matthias

You’ll need to be a bit more specific. If you just want to map a standard rudder axis you can do that easily in the flight sim peripherals menu.

Is there some reason you can’t use the default mapping system?

Hello! Thank you so much for developing and sharing this tool. I am looking forward to use it but I have been unable to get my DIY controller to be recognized by FSTool. My Logitech Stick shows on the joysticks menu dropdown list and all buttons are instantly recognized. This same screen is empty when I select my Arduino based controller that is being recognized normally by windows/MSFS. Are there any steps that I can follow or some requirements that my controller needs to work with FSTool? I expected it to work since the joystick mappings XML has a section for a HID device with the same name, but maybe I am doing something wrong.

Thanks again for sharing!

Sorry but I can’t think what might be wrong. I have an Arduino based switch/rotary encoder box and it works as expected.

Here is my Arduino code - hope it helps.

/ 2021-01-10
//--------------------------------------------------------------------

#include <Encoder.h>
#include <Joystick.h>
#include <LibPrintf.h>

long posEnc1 = 0;
long posEnc2 = 0;
long posEnc3 = 0;
long posEnc4 = 0;
int pinValEnc1 = HIGH;
int pinValEnc2 = HIGH;
int pinValEnc3 = HIGH;
int pinValSw1 = HIGH;
int pinValSw2 = HIGH;

Encoder enc1(13,12);  //create an object for the encoder
Encoder enc2(10,9);
//Encoder enc3(18,19);
//Encoder enc4(16,17);
Encoder enc3(0,1);
Encoder enc4(2,3);
Joystick_ Joystick;

void setup() {
  Serial.begin(9600); //open a serial port
  pinMode(6, INPUT_PULLUP);
  pinMode(7, INPUT_PULLUP);
  pinMode(8, INPUT_PULLUP);
  pinMode(11, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);
//  pinMode(15, INPUT_PULLUP);
//  pinMode(16, INPUT_PULLUP);
//  pinMode(17, INPUT_PULLUP);
//  pinMode(18, INPUT_PULLUP);
//  pinMode(19, INPUT_PULLUP);

  // Initialize Joystick Library
  Joystick.begin();
}

void loop() {
  char buf[16];
  long newEnc1; //create variable for holding new encoder value
  long newEnc2;
  long newEnc3;
  long newEnc4;
  newEnc1 = enc1.read()/4;  //read the encoder values, and divide by four to get a single increment/notch
  newEnc2 = enc2.read()/4;
  newEnc3 = enc3.read()/2;  //divide by 2 for Propwash style concentric encoders
  newEnc4 = enc4.read()/2;

  if (newEnc1 != posEnc1) { //if there is a change between the current reading and the last reading
    sprintf(buf, "A:%d", newEnc1);
    Serial.println(buf);  //print the current counter
    if (newEnc1 < posEnc1) {
      Joystick.setButton(1, 1);
      delay(20);
      Joystick.setButton(1, 0);
    }
    else {
      Joystick.setButton(2, 1);
      delay(20);
      Joystick.setButton(2, 0);
    }
  }
  posEnc1 = newEnc1;  //update the last position to the current position

  if (newEnc2 != posEnc2) {
    sprintf(buf, "B:%d", newEnc2);
    Serial.println(buf);  //print the current counter
    if (newEnc2 < posEnc2) {
      Joystick.setButton(11, 1);
      delay(20);
      Joystick.setButton(11, 0);
    }
    else {
      Joystick.setButton(12, 1);
      delay(20);
      Joystick.setButton(12, 0);
    }
  }
  posEnc2 = newEnc2;

  if (newEnc3 != posEnc3) {
    sprintf(buf, "C:%d", newEnc3);
    Serial.println(buf);  //print the current counter
    if (newEnc3 < posEnc3) {
      Joystick.setButton(21, 1);
      delay(20);
      Joystick.setButton(21, 0);
    }
    else {
      Joystick.setButton(22, 1);
      delay(20);
      Joystick.setButton(22, 0);
    }
  }
  posEnc3 = newEnc3;

  if (newEnc4 != posEnc4) {
    sprintf(buf, "D:%d", newEnc4);
    Serial.println(buf);  //print the current counter
    if (newEnc4 < posEnc4) {
      Joystick.setButton(23, 1);
      delay(20);
      Joystick.setButton(23, 0);
    }
    else {
      Joystick.setButton(24, 1);
      delay(20);
      Joystick.setButton(24, 0);
    }
  }
  posEnc4 = newEnc4;

  int temp = digitalRead(11);
  if (temp != pinValEnc1) {
    pinValEnc1 = temp;
    if (temp == LOW) {
      Joystick.setButton(0, 1);
      Serial.println("AC:1");
    }
    else {
      Joystick.setButton(0, 0);
      Serial.println("AC:0");
    }
  }

  temp = digitalRead(8);
  if (temp != pinValEnc2) {
    pinValEnc2 = temp;
    if (temp == LOW) {
      Joystick.setButton(10, 1);
      Serial.println("BC:1");
    }
    else {
      Joystick.setButton(10, 0);
      Serial.println("BC:0");
    }
  }

  temp = digitalRead(4);
  if (temp != pinValEnc3) {
    pinValEnc3 = temp;
    if (temp == LOW) {
      Joystick.setButton(20, 1);
      Serial.println("CC:1");
    }
    else {
      Joystick.setButton(20, 0);
      Serial.println("CC:0");
    }
  }

  temp = digitalRead(6);
  if (temp != pinValSw1) {
    pinValSw1 = temp;
    if (temp == LOW) {
      Joystick.setButton(4, 1);
      Serial.println("S1:1");
    }
    else {
      Joystick.setButton(4, 0);
      Serial.println("S1:0");
    }
  }

  temp = digitalRead(7);
  if (temp != pinValSw2) {
    pinValSw2 = temp;
    if (temp == LOW) {
      Joystick.setButton(5, 1);
      Serial.println("S2:1");
    }
    else {
      Joystick.setButton(5, 0);
      Serial.println("S2:0");
    }
  }

  delay(1);
}