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
russgreen
Posts: 5
I read somewhere that this was supposed to be easy!

I have XPUIPC 2.0.4.8 and Mobiflight 7.4 installed.

I have an ardiuno mega that Mobilfight has loaded the firmware onto.
I have encoder already wired up to the Arduino and they worked fine with ArdsimX and Air Manager BETA 3 so I know the hardware is good.

MFC shows a green tick next to Modules and a green tick next to XPUIPCStatus.

Just testing with the heading bug. I have a line item associated with a Heading Bug encoder device. In On Left I have set:
Action type: FSUIPC Offset
Use preset was Autopilot - Heading
Offset: 0x07CC
Value Type: Int
Size in bytes: 4
Mask value: 0xFFFFFFFF
BCD mode: False
Set value: $ - 182

Clicking test with the line item active or clicking run and it does nothing.

I've seen another post recommending testing the hardware (I know it works with other software) but on another encoder i set action type to Key and A in the input field. Apparently if I then activate Notepad and turn the encoder is should type A in the text editor. It doesn't.

I'm a bit lost.
[Last edited by russgreen, 2017-09-09 19:48]
2017-09-09 12:31
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi my friend....
Welcome to Mobiflight.

i just see your request but not found time to awnser..... I try to reply until tonight. Sorry for delay ! Please stay patient!
Good Luck !
2017-09-11 14:01
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Ok.....

1. the Test function.....
iconrussgreen:

Clicking test with the line item active or clicking run and it does nothing.


Thats logical.... The test function basicly is for Outputs.... Your Encoder only can execute something if you turn it. So... Make a config like you said... klick RUN and then TURN the Encoder.... Only then you can see a reaction.

For alternate testing like you said with notepad please look up. In new Mobiflight Version 7.4 there is a new option "Offline Mode" . You have to activate. If NOT you only can do a test (Like in tha past with older Mobiflight Versions) in Notepad ONLY if Simulator (FSX) is STILL ON and seen by Mobiflight.... Elseway your Keys are NOT send.
AND Note the keys only send to a active Window. If you use Notepad get shure you have Notepad ACTIVE and you klick with your mouse to the Cursor....
Easy eyplaned.... If you push a key on keyboard ( "a" for example ) it must work, too..... If you not activate the Cursor with mouse then it cant work.

****
So Test situation.... Activate mobiflight.... Make a config for your encoder "on Left" and use Key... "A" Make another Config for "On Right" and use Key "B"
Now RUN Mobiflight Connector AND Run Xplane (Modules is green) or get shure you use "Offline Mode" .
Now Open Notepad.... klick on the Cursor and get shure it is active ( simply push some keys on keyboard and check if Notepad write it)
And now turn the Encoder left and Right for 1-2 full turns. If everything is OK in notepad should AAAAAAABBBBBBB shown.
****

So please get shure your encoder is working with Mobiflight correctly ( As i describe above).
If NOT please recheck your DEVICE configuration

If YES we need to take a look to your Config Settings. Just Request !


Final Note:
iconrussgreen:


I have XPUIPC 2.0.4.8 and Mobiflight 7.4 installed.
.....
Action type: FSUIPC Offset
Use preset was Autopilot - Heading
Offset: 0x07CC
Value Type: Int
Size in bytes: 4
Mask value: 0xFFFFFFFF
BCD mode: False
Set value: $ - 182



XPUIPC 2.0.4.8 is not official..... I not use it and can´t tell you if it work simmular to the original XPUIPC

And your config can´t work..... If Current Heading is 000 then it is bugged.... you have no override in your Value.... If Current Value is 000° for example you try to set -1° ..... here you need a IF Function that manage..... "IF Value is 000 then Value should be 359"
Maby you can try .... if($>181,$-182,65536)

Please report experience.... Then we plan next steps !
Good Luck !
2017-09-11 15:53
Avatar
russgreen
Posts: 5
I've just seen your reply. I will try this tomorrow and report back
2017-09-13 18:41
Avatar
russgreen
Posts: 5
OK I've just tested again.

Using Mobiflight 7.4 in offline mode.

I've configured several encoders (that all work on this board with ArdsimX installed on the Arduino) and configured them to use the Key action with A for left and B for right.

Click run

Open notepad and activate. Keyboard can type. Turn the encoders and nothing.

I tried originally with the XPUIPC version here http://www.tosi-online.de/XPUIPC/XPUIPC.html but sourced the upgrade when nothing worked thinking it might be that. I've put the older XPUIPC into my XPlane plugins folder now.

Startup Xplane and unticked Offline mode in Mobiflight settings.

Changed the set value to be as your example if($>181,$-182,65536)

Mobiflight status bar now say XPUIPCStatus GREEN.

Turn the encoders......Nothing.
2017-09-15 08:21
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Again
Thanks for Testing.

Now i think we get a Hardware Problem..... If you encoders NOT work in the Notepad Test then it can´t work in the Xplane Situation, too. They are simply not working basicly !

Now problem is to find out what is wrong.... Nobody Else report something like this.... And normaly Encoders should work fine !
I can´t see your Setup.... Specialy the Hardware Part.... Pretty Shure there is a Problem there, if Mobiflight completly not "see" the Encoder Inputs... OR it is a installation Problem of Mobiflight Firmware !

I can give you some tips, but again without see the System i can´t realy help you productive !

1. To check basicly if Encoder Inputs are recive by Mobiflight....
Please Enabele the Logging Mode ! Type DEBUG ( These can be done in the Settings Submenu. )
If Mobiflight is RUN and you turn a Encoder then in the Debug String ( The 3 Line Field field below the Configs) EVERY Action must be shown.
There Must be a Output like " Encoder xxxxxx execute On Right " for example. ( You can click this field and use UP/DOWN ArrowButton on Keyboard to scroll)
IF There are no notices in this Box your System NOT Get any Data from Arduino. ( Maby you can confirm while turning the Encoder the Status LED on Arduino is blinking )

Please Note.... I Not know the ArdSimX Systme.... Can you confirm the Connection from the Encoder is SAME like in Mobiflight ? In MF the Datalines (A,B) bust be set to two of the DigitalPins 2-51 and the 3rd Line must be Set to GRD..... Maby ArdSim use PullUp Technic and your 3rd. Line is set to 5v ???
Or do you use a Encoder with more then 3 Lines ( With a additional 5v Power suply ??) Then you have to chekck your wire system, tot. Is that compatible to the Mobiflight Requirements ?

2. Is Firmware Update work fine ? Do you make a RESET after updating the Firmware.
Here again i not know ArdSimX.... Maby it use the EEPROM of Arduino for its firmware.... So "maby" it can be problematic to flash a Arduino as a MobiflightBoard if there is already the ARDSim Firmware in the Memmory !

If you like you can Try Out to remove the EEPROM Entrys yourself via the Arduino ID Example Sketch "ClearEEPROM" Before you try to flash the Board.

3. Can you Confirm your settings in the Device Manager are Correct.... Do you use the correct Pins for the Encoders you define in the Devices ? And Again do you make a restart after upload a Device ( Mobiflight AND Arduino Restart !) ??


Sorry i can´t help you more at the moment... It´s your job to confirm your Hardware Part is 100% Correct and you do the recommend workflows..... Only if all these is confirmed and you already get the problem we can looking for a solution !
Good Luck !
2017-09-15 15:05
Avatar
russgreen
Posts: 5
Does the Mega 2560 have to be an R3?
2017-09-16 09:04
Avatar
russgreen
Posts: 5
Sorry. Missed an important step. I didn't upload the modules to the arduino.

The debug now works and the aaabbbb text thing works in notepad.

Can't make the heading bug move in xplane 11 though but at least a big step towards making it work.
2017-09-16 11:10
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Wonderfull.

Hope you understand.... I must assume that you did all important stepps youreself when you report a issue. If you miss like in this situation simply to upload your device settings i can´t see the problem!

NOW.... Your Encoder workes... Mobiflight workes !. Last problem is the Config now.

I don´t know the XPUIPC System cause i not use it BUT normaly those basic functions should be simmular to FSX. But as i told you.... the new versions of XPUIPC are not official and there some users rework the logic for there own uses.... So i can not confirm that the Offset workes correctly.

What you can do....
1. Get absolutly shure your settings are correct.... Use the Encoder for the Config you test already with notepad.... Get shure Config is Activated. Get shure Mobiflight is running AND there are 2 Greens for Modules and FSUIPC Status ( Lower Left ).

If your Config NOT work, then please try out another Function..... For Example define ON LEFT "Flightdirector ON" and ON RIGHT "Flightdirector OFF" ( or any other function) .... just to find out if there is completly no communication OR if simply the used Offset is bugged.

Finaly... If your encoder work ok for other things and only the AP Heading is not ok, then we can take a look again and can try out how we can solve this for you !


EDIT: IMPORTANT : I just research the XPUIPC Offset List.... Instead to FSX the Size for this Offset is 2Byte ( Not 4 Byte like in FSX or Preset) Normaly this should not make a difference.... BUT you can Try out this.... Maby XPUIPC have a problem when you use wrong Size !
[Last edited by pizman82, 2017-09-16 14:43]
Good Luck !
2017-09-16 14:29
icon