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!
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.
Hello, I need some help, i am trying to make a vor for the cessna 172 in fsx, and have a little issue with the parameters, i am using the 0C48 offset for the loc needle, but the servo is not moving in the right direction, when the needle in the vor is completely to the left, the servo is in the middle position and when it moves to the right and reaches the middle position of the vor, the servo moves to the starting position again, i do not know if i have to make a conversion, and do not know how to make it, i tried many configurations in min and max value of the servo and with the interpolation, but i couldnt solve the problem, if someone could help me it would be great.
Pretty easy.... I not do this myself but the main logic work always same way.
1. Search for the Raw Data and get as much information as possible..... Mostly in Offset Lists.
0C48 1 NAV1 Localiser Needle: –127 left to +127 right
2. Observe the Offset !
Create a new File in Mobiflight
Create a output config and insert the needed Data. In That Case Offset 0C48 Typ INT Size 1 Byte. Please us NO DEVICE.... NOT select your Motor !
Now startup your Sim and run Mobiflight.... Get sure you can see Sim and Mobiflight Connector Window at same time ( So use Sim in Window mode ! )
Play with the Offset.... In your case fly 360° circles so the Offset goes mutliple time from lowest to highest point and back.
Always check the Data in Mobiflight Window right of the Config..... The "FSUIPC Value" line show you the value that i send by FSUIPC at the moment.
Finaly you must know.... HOW do the Offset work. Is it in that case realy from -127 to +127 or is it for example 0-127 to the right but to the left it is 255 ( beginning in the middle) downwards 129 for full Left ...... If yes then this is a "Signed Unsigned" issue in FSUIPC.
( I not test it.... So i not know the awnser myself)
3. Build Output Value.
After know youreself how the Offset work it is easy to build the config.
For example If Offset realy go from -127 to +127 i recommend to bring the value to a positive Value all time ( Cause Servos not like negative Raw values as i remember)
Use Transform " $+127 " .... Then Offset Range is 0-254 .... Use in Servo Settings Min 0 Max 254 (or 255) and all is fine. Value 0 is full left... Value 127 is Neutral Value 254 is full right.
If Offset include the signed unsigned Problem as i said above then formula is more difficult.
Use here if($>127,$-127,$+127) That means if Raw Value is Above 127 ( So needle on the left side of the panel) then it subtract 127 ..... Then Full left is changed to "0" and 1 Point to left is changed to 126 .... If Raw Value is less then 127 ( Needlo on the right) our formula "Add 127" so Neutral 0 change into 127 and full right change into 255.
Servo Settings are the same. Cause we finaly also have a Value 0-255
*************
You see... The key is to "understand" and learn how the offset work..... then the final step to create a formula is not problematic !
Please report success and tell us what way was correct.... Then other user still know how the Offet work !
hello, I tried what you say, in the fsuipc value (all to the left) it shows 130, in the middle it shows 0 and all to the right it shows 127, i used Transform " $+127 " and servo settings min value 0 and max 255 but it did not work, then i tried the second option that you gave me but it did not work too. The only way that i found to make it work was making an interpolation. This was my interpolation setting, it could be useful for someone else:
And now i have a similiar issue with stepper motor, i am using the 0C4E offset for the OBS, i could make the stepper turn in the correct way, but in the sim when it goes for example from 010 to the left 334 when it reach the 0 degree the stepper make a 360 degree turn and and then it keeps turning correctly. What could i do to solve it?
If Offset include the signed unsigned Problem as i said above then formula is more difficult.
Use here if($>127,$-127,$+127)
Check your Interpolation.... It make exactly what my formula will do .... If Raw Value is bigger then 127 it will subtract ..... If Value is less then 127 it will Add .
Ony difference is you use not always same value.... But also nearly 130 +/-