MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
Hi, I'm just getting started on this technology, so I have a few questions as I formulate my design and make sure I do it right.

My first panel will be a transponder. I purchase a real one for parts, to use as my front panel. I want to use the existing 4-position switch as well as the 4 8-step encoders. The encoders have a disc with numbers on it to show through the display window. My questions:

How do I get the values in the sim to sync up with the values on my transponder dials when the flight first starts? Same for the switch- do I have to use a mouse in the game to change the values on the screen to match the real values and positions on my panel?

If I was to make a real gauge- a compass for example, how do you get the physical compass match the value in the game?

Or a brake- if the physical brake is on, but the game starts and it's off, do I have to click on the brake in the game to get it to match with my brake before I start? Is it a matter of having the aircraft's defaults always be the same and set my control to match?

I hope this makes sense.

thanks, Dave
2017-06-23 23:23
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
Hi Dave!

Generally you can assign a button that can trigger a resync of all connected devices. This means it will resend all events to the Sim based on the current switch position.

I am not sure about the transponder. If you can read the discrete setting somehow it might work with the above mentioned method. If not - e.g. you only get the push of the button, then you have to properly follow your shutdown checklist and put 1200 at the end of the flight.

For gauges MobiFlight takes care of moving the card back in its default position and the next time you start the sim it will be automatically synced.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2017-06-24 03:30
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Dave. welcome to Mobiflight,

i think you need a bit more informations at this point,

1. Button Synchro

The Buttons must be split up in 2 Groups. Simply Push Buttons NOT need a synchro cause the have no visual or mechanical Position. Problems are Switches and Rotary Encoders cause these are always in a fixed Position.

Note the Synchro tool of Mobiflight workes good and set EVERY Switch in the SIM to the same Position like its in the Homecockpit at the moment. Only problem here are ON/OFF/ON Switches. These not work with the tool if they in ON Position..... Plan with ON-ON-ON switches OR set all On/OFF/ON switches to OFF while you do the Synchro Function !
BUT here i must say most of Cockpitbuilders do this with a other solutuion.. They write a simple checklist for all Switches and Rotary Switches and use a PRE State. Before every Systemstart they set /check that all switches are in the correct position like in the Basic Save file of the Plane.
Normaly when you finished your flight you can still do this and shoutdown your plane with this list.... Then all Buttons are already correct for next flight.

Alternate: SOME ADDONS like PMDG allow us to save the Current Panel State..... If you will Stop flying then SAVE your Panel State and not touch any switches in your cockpit then...... On next flight you LOAD the PanelState File and then the Sim ist already in same siatuation like your Homecockpit !

**********

2. The Transponder.
Here i think you will get in bigger trouble.
The Transponder you explane work different to the FSX Transponder.
First i think you got a issue in you desricption: You say "well as the 4 8-step encoders" .... I´m pretty shure this are NOT Encoders. This are Rotary Switches.
A Encoder have no visible Position like you need for the Disc. To synchro the switch command and Disc Position i´m shure this is a 8 position rotary Switch with or without Endstop !

Here we got the first Problem.... FSUIPC work (via EventID) for the single Numbers of Transponder Frequnecy with Increase and decrease Commands
There is NOT a SET Command for this......
Thats why normaly a Encoder is used instead of a Rotary Switch... A Encoder will Encrease or decrease with left and right.... A Rotary like youres will SET on every detent.

Basicly we got a different logic to do this already with a SET Logic BUT..... this is not posible with Mobiflight at the moment.....
MABY you can do this direct via a registired FSUIPC but i never try this myself ( Not shure if this is posible there)

NOTE TO SEBASTIAN !!
This is now a situation that we talked some weeks ago https://www.mobiflight.com/forum/message/4825.html .
The Transponder can not be SET via EventID specific for ONE Diggit. To do this we need to Write the Offset !
Value is written in Offset
iconQuote:

Offset 0354 Size 2 Byte ---- Transponder setting, 4 digits in BCD format: 0x1200 means 1200 on the dials.


Here the 2 Byte Offset is split into FOUR Nibbles (Halfbyte) that include the BCD coded binary Values each for ONE of the 4 Numbers.
To SET for example 7 to the "1000" Diggit we need to Bitmask the 4 needed BITS of the 2 Byte (16 bit) Offset and need to Write the bitts with "0111" to show a 7 in BCD.
Only posible if we can write MORE then 1 Bit individual with a bitmask !


Solution:
MABY You can do this with FSUIPC.... Im shure you can do this with a own script, that split up the Original BCD Offset into 4 seperate Offsets ( one for each diggit) .
BUT This is maby verry difficult and require higher skills in programming.

My recommend solution.... Simply use the technic that is arleady suported by Mobiflight and FSUIPC.
Remove the Rotary Switches and Discs of your Panel.... Mount Encoders instead of the Switches and 7 Segment Displays instead of the Discs behind the Window.
THEN you can simply increase/decrease each Number and show always the Ingame Frequence on the 7 Segment Display.
Good Luck !
2017-06-26 02:07
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
Hi, I've put down the sim work for a while, but I've recently had time to open up my transponder finally. The switching mechanism is really quite elegant in its simplicity. The dials are backlit, and have posts that connect to a neat array of flat 8-position switches. If I connect an 8-position encoder to the post, I think it should work, as long as I start the flight with my physical encoder and flight both set to '1200,' right?
2017-08-02 18:52
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconmonkeysuncle:

If I connect an 8-position encoder to the post, I think it should work, as long as I start the flight with my physical encoder and flight both set to '1200,' right?



I don´t understand... What do ypu mean with a "8 Position Encoder". A Encoder get NO Positions... It´s endless and normaly it got 20 or more detents by rotation. I not seen ever a ENCODER with exact 8 Detents.

Finaly if you find a hardware encoder for this the last problem is you have no "synchro". If you got a missing event then your Display show the wrong number and you have to Stop Mobiflight.... Reset the Transponder to the current Value in Sim and start again.

As i wrote in last posting.... You got baiscly 2 technics that this work 100% fine...
a) Reset the Display Discs and use a 7 Segment Display and Encoders
b) find a Software solution to to this.... But here i can say this is not posible with Mobiflight or another Custom Software. here you need pretty shure a own written code !
Good Luck !
2017-08-04 05:44
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
I found these encoders:
http://www.mouser.com/ProductDetail/Grayhill/25LB45-Q/?qs=sGAEpiMZZMsWp46O%252bq11WX9topLpsItZG2yf5eWl3GQ%3d

Which have 8 detents (that's the word I should have used instead of 'position.') The mechanical switches from the real transponder step in 45 degree increments, and I want to connect the encoders to these switches. if I understand what you are saying, could I use any encoder, as long as the number of detents is divisible by 8 (such as 16 or 24)? I apologize for my naivete, I'm new to this process, I appreciate your patience.
2017-08-14 20:02
icon