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! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
Shand359
Posts: 17
All of a sudden 3 of my 6 encoders have stopped registering with mobiflight… When I turn the encoder the pulse light on the Arduino MEGA is flashing as it always did but the software does not pick up the movement now. It worked fine up until last update....
2018-08-04 21:49
Avatar
StephanHo
From: EDDG, Germany
Posts: 1488
Supporter
Hi Shand,

did you activate the logging within Mobiflight? (MENU -> EXTRAS -> SETTINGS -> LOGGING).

Here you can see, how MF is recognizing a device (or not).

With the introduction of version 7.5.0 a change in the encoders was realized. So it is now possible to set the encoder type (1: 1, 2: 1, 4: 1). If nothing is set, an encoder is set as type 0 (1: 1) by default.
It may be that the current encoders are misrecognized or misinterpreted. It is advisable to set the actual encoder.

Please adjust and give feedback here.
Grüße,
Stephan
2018-08-05 09:38
Avatar
Shand359
Posts: 17
Thank you for your reply.
The encoders I have are set correctly as 1:1. When I turn the encoder I can clearly see the T/X light flashing on the MEGA but even the debug mode does not show the pulse. Does this mean my encoders are faulty..... ?
2018-08-05 10:30
Avatar
StephanHo
From: EDDG, Germany
Posts: 1488
Supporter
If the debug-mode shows nothing it also can be a wiring or a config problem. You should check the hardware
Grüße,
Stephan
2018-08-05 11:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3313
Supporter
Hi

Please confirm your Setup workes before 7.5.
Do you have set the SAME Encoders (Without change electrical Setup) in a earlyer Version ??

If yes... Please try out to Delete the 6 Devices (Upload one time so they are gone) and then Create all 6 encoder new and upload again.

Basic Note: The flashing LED on Mega only indicate taht "something" is happen on the Mega . It not say the correct thing is happen..... And much more important.... IT NOT say that Data is finaly send to Mobiflight on your PC.

If Reset not work....
Please create a complete clear system. A Mega.... Only 1 Encoders connected..... Create 1 Encoder Devices on correct Pins.
Create 1 Config ( For example control AP Heading in a Standard Aircraft) with Left and Right ( Increase decrease)
Test it !
Good Luck !
2018-08-22 06:34
Avatar
Jabezlr
Posts: 10
Hi Stephano and Pizman,

I have a similar problem where my encoders are not working.

I recently started on MF and have only used 7.5.2.

I was able to set up my AP which worked great - buttons and encoders all functional. Today I started with my COMS and I was not able to get any reaction from my test encoder. I reconnected the test encoder to my AP Heading (which was fully functional yesterday) and again no reaction from the encoder.

I then did the following:
- Again upload firmware.
- Remove and add encoder device.
- Flashed another clean Mega
- Added an encoder for AP Heading and a button for AP Master.

The AP Master button functioned correctly.
The encoder again did not react.The LED on the Mega does blink when I adjust the encoder.

I also turned on the debug log. I received the following messages for the encoder
2019/03/09 10:23:49 PM(163): Executing OnRight: Encoder@
2019/03/09 10:23:49 PM(133): Config found for button: Encoder@
2019/03/09 10:23:49 PM(103): Executing OnRight: Encoder@

I sometimes also get the following message:
2019/03/09 10:24:52 PM(43): FSUIPC2Cache: skipping Process(), last read (60) less than 190
2019/03/09 10:24:52 PM(13): Executing OnRight: Encoder@
2019/03/09 10:24:51 PM(983): Config found for button: Encoder@
2019-03-09 21:25
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3313
Supporter
Hi

That confusing me a bit.
iconJabezlr:


I was able to set up my AP which worked great - buttons and encoders all functional. Today I started with my COMS and I was not able to get any reaction from my test encoder. I reconnected the test encoder to my AP Heading (which was fully functional yesterday) and again no reaction from the encoder.

......
I also turned on the debug log. I received the following messages for the encoder
2019/03/09 10:23:49 PM(163): Executing OnRight: Encoder@
2019/03/09 10:23:49 PM(133): Config found for button: Encoder@
2019/03/09 10:23:49 PM(103): Executing OnRight: Encoder@



What do you mean with RCONNECTING ??

Basic Question.... Is this a Hardware or a Software Problem.

If your Logging Debug String ( I don´t know if you do it with the AP or the COM Config) looks like you say then the encoder work !
"Executing on right" means the Encoder is detected by the Arduino and also the signal recive by Mobiflight.

Normaly those testings are done with the SAME bord.... Means you not change the Hardware and create a new config ( now for COm instead AP) and you use SAME Encoder for this.
So you can get sure the Hardware works fine.

******
At first find out the issue.

I personaly use the "KeySend" Methode mostly.

Create a new config.
Create a INPUT Line
Device is your Encoder
ON LEFT you say ... Typ "KeySend" and you use "A"
ON RIGHT you say also "KeySend" and you use "B"
(Not use the on Fast pages)
RUN Simulator
RUN Mobiflight
Open a Text Programm like Word, Editor, Wordpad or simply the Text field of your Internet Eplorer or Firefox ( Simply a programm where you can Enter Text on a Cursor position)
Get sure this window is ACTIVE
And now turn your Encoder.
If it work fine a Left turn over multiple detents will write A A A A A A A Rightturn will write B B B B B.

If Yes..... Then your current configs are simply wrong.... So Mobiflight see the Encoder and execute somthing but its wrong and nothing happend.
If Not then your Encoder will not work at the moment.
Then you have to check Device Settings, Electrical Setup, firmaware etc...... That means the Issue is on Hardware side !
Good Luck !
2019-03-10 15:28
Avatar
Jabezlr
Posts: 10
Hi Pizman82,

Thank you very much for an excellent piece of software and your quick feedback on my issue.

Apologies for creating confusion, let me explain better:
- I am using 1 test encoder to set up my system.
- The test encoder was connected to pin 17 and 18 for AP Heading. It functioned correctly and changed in FSX when I turned the encoder left and right.
- I then connected it to pin 34 and 35 to set COM1 up. I did not get any response in FSX.
- I then started to debug and reconnected to pin 17 and 18 to check if the AP Heading is still working.
- When I did this the AP Heading did not work in FSX. I made no changes to the AP Heading configs when I tested it originally and when I reconnected it.

I tested the "Keysend" method and it works perfectly. I receive the following outputs when I turn the encoder left and right:
"bbbaaaaabbbbbbaaaaaabbb"
It therefore seems not to be hardware related.

I then retested today in FSX - now all seems to be working fine which is very strange. It seemed to be a intermittent issue. Encoders working on Friday, no reaction from them yesterday (I also restarted my pc several times and tried a second encoder, removed and reinstalled MobiFlight, with no success). Today they are functional again.

I will keep you up to date should this happen again.

And again, thank you very much for the prompt response.

Jabez
2019-03-10 17:01
Avatar
Jabezlr
Posts: 10
Hi,

After the success of last night I tested it again this morning. Today my encoder with AP Heading is not functioning at all in FSX again.

Tested "Keysend" and this is functioning correctly.

Hope you can asssist.
2019-03-11 07:31
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3313
Supporter
Looks like your Encoder "Dont like Mondays" :P

To topic.

I can´t see your system but thats not normal. ( Pretty sure a Problem of changeing the Encoder on Arduino Pins)

Do you make the "Reconections" while MF is runnig and Board is still under electrical power ?
Thats NOT Recommomend and can kill the Board.... But it pretty sure crash your system temporary.

Some recommends for testing !

You not need to "reconnect" your encoder on Arduino to test different things.....
Whatever if you realy want to do that then Discconect the Board.... Set the Encoder to new Pin.... Then Open MF and create the NEW Device ( now on Pin 34/35 as you said) AND Delete the Device on 17/18 cause there is no Encoder now set there)
AGAIN: This is basicly not needed.... For Testing progress we use ONE Encoder (Always on same Pins) for testing hundrets of different things !

Test Exeample:

If you like to test AP Heading and COM 1 with your single Encoder.....

1. Set your encoder to a Pin.... For example 17/18
2. Create a Device in the Settings Tab.... NEW Device - Typ Encoder - Pin 17/18 Correct Detent Setting ..... Then Press UPLOAD and wait until success.
3. RESTART Your Board after Device Upload..... Simply Disconnect it from USB and Wait 5-10 Seconds then reconncet the USB.
4. Start Mobiflight Programm
5. Create a NEW Config File
6. Make a Config for AP Heading..... Use Your Encoder Device and Test it ( Should work perfect)

If you NOW like to test COM1 with this Encoder then NOT Remove it or create a new Device ! .... Just make a New Config Line that work with SAME Encoder on Pin 17/18 again.

1 Simply delete the Configline from AP Heading. ( Without delete or disabele both configs will work simmular and thats confusing)

2 Create a New Line ... Now use Offset/Event for COM1 and set it to the SAME Encoder like before.
Now you can Test your Encoder with COM1.

***********

Summary... For testing a Encoder Input you need just ONE Encoder that stay on its Pins all the time. In Testing progress you just change the controlled Function ( AP, COM and so on) but you NOT change the Device.
If all Functions work with this single encoder with your individual single testings.... Then they will work also if you use 30 Encoders instead of One and all Inputs got there own Encoder Device !
Good Luck !
2019-03-11 11:30
Avatar
Jabezlr
Posts: 10
Hi,

Thank you very much for the advise and assistance. I was able to get it working .... or that is what I thought.

I again have an intermittent issue. But this time with manual offsets. I believe it is related to the issue I had with the intermittent encoder.

I did the following:
- I created 11 off inputs using manual offsets (66C0 to 66CA). Arduino pins used 18-21 and 34-39. Value=1 on press and 0 on release.
- I created 11 off precondition outputs and tested all of them - no issues in the testing.

The problem started after I shutdown FSX, MF and my Arduino.

I start up in the following order: FSX, then Arduino, then MF.
Of the 11 inputs only a few will work.
If I then Stop MF and upload the same config (not making any changes), other inputs will work.

I ran the test 10 times (Stopping, then uploading the config, then Running again) and here are the results I got. The numbers indicate working inputs (numbered from 1-11)
- Test 1: 3,10
- T2: 1,11
- T3: 1,2,6
- T4: 1,2,3,4
- T5: 1,2,3,5,6,7
- T6: 1,3,4,6,7,8,9
- T7: 1,2,6,7,8,9,10,11
- T8: 4,6,7,8,9,10,11
-T9: 8,9,10,11
-T10: 1,10,11

The tests are also repeatable, if I restart FSX, Arduino and MF, I get exactly the same results of test 1-10 shown above.

Please assist - I have been struggling for hours to see if I can find a workaround. However, no success.

Thank you
2019-04-03 22:31
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3313
Supporter
Hi Again.

I´m Pretty Sure there is a issue in your Config finaly.

At first 2 things....

1. I don´t understand the term " If I then Stop MF and upload the same config (not making any changes), other inputs will work.
What do you mean with Uploading Config ?? If your 11 Buttons exist then you not need to "upload" them again.
Also these is device-Config or "mfmc" Data.... the "Config" means your mcc. But you can not "upload" a mcc file. It would be simply start !

2. I not understand the workflow to write Custom Offsets here ?? Was this just for testing ?

For "testing" i personaly use the KEY SEND Methode. (Using KEY SEND as Input Typ.... With a Text Programm you can check if Commands are executed.
Alternate is to enable LOGGING MODE in Mobiflight.
Now you got a 3 Line String below the Window. If you press a Button and Mobiflight "see" the action then there is a Info there like "Button "xy" pressed"
THERE you can also check function of all connected Input devices.

***************
To help you i think the most easy way is you send me your 2 Files ( *.mcc and *.mfmc ) I will upload it on my testing board and try to reproduce the problem.
My Email is ..... pizman@freenet.de

EDIT: Please write Your Name and "Mobiflght" in the Header.... To protect Spam/Trash Folder !
Good Luck !
2019-04-03 23:03
Avatar
Jabezlr
Posts: 10
Thank you for the quick feedback and help – much appreciated.

With regard to the 2 issues:

1. The reason why I uploaded the same config file again and again is I have tried everything during fault finding and this provided some changes to the behaviour of my system. Even though the buttons were there, it gave me a different result each time after I uploaded them again. This made me think that it might not be uploading correctly. This I understand is the mfmc. Am I also correct to say these are flashed to the EEPROM?

2. Reason I use the custom offsets is because of the layout I will have on my simulator which simply works like this (e.g. COMS):
- You select on a 6 position rotary switch what you want to adjust (COM1, COM2, NAV1, NAV2, ADF, IDE). – (Pins 34-39) on my Arduino.
- The encoder button (Pin 42 and also a manual offset) is used to adjust the resolution. As an example, if you press the encoder button, then COM1 will select between MHz and kHz.
- The encoder is then used (Pin 40,41) to adjust value up or down dependent on 2 preconditions. As an example, to adjust MHz on COM1:
- 6 position rotary switch need to be selected to COM1 (Pin 34), giving a value of 1 when selected.
- Encoder button must give a value of 1 or 3 (Pin 42)
- Turning the encoder should now adjust the MHZ on COM1 radio. (Pin 40,41)

I have also tested with debug mode on. It only registers when the Precondition in the output tab indicates a FSUIPC value.

I will send you both the .mcc and .mfmc files this evening once I am in front of my pc.

Thank you for your help with my issue .
2019-04-04 15:15
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3313
Supporter
Ok.

So if buttons not registred we have a problem that must be observed. i will do if you send me the files.

About your Technic....

Thats basicly correct.... Whatever a more comfortable and profitable way is done normaly.

So your right... You need for example a custom Offset for the Encoder Button to switch between Mhz and Khz. But here you should not work with 1/3 Value.... You must use 0/1
( With 1/3 the Offset is ZERO on system Start.... So your Encoder will not work. With 0/1 it still have a function while start.)
Also its recommend to use maby this Offset for ALL Double Encoders you need. ( If there are mutliple in the cockpit). Then a Buttonpress of every Encoder will change SAME Offset..... In Case you never use 2 thungs same time its no rpoblem.... But you finaly save lots of offsets and configs !

For the Rotary Switch the system is also a bit to difficult... For 6 Positions you need 6 Configs (1x Button per detent) BUT you not need 6 Offsets ... You will use also ONE Offset here. (1 Byte INT) .... Position 1 will write Offset to "0" .... Next position write it to "1" ... also next to "2" and so on.
Same benefit like above.... All Configs (Encoder, LED, Display) use this ONE Offset for Precondition.... All COM1 Stuff say "Only work if this Offset = 0 for example. All COM2 Stuff say "Only work if its "1" ) and so on.
Good Luck !
2019-04-04 16:55
Avatar
Jabezlr
Posts: 10
I have sent the config files. Hopefully you can find the issue I have not been able to.

First I need to explain why I use 1 and 3:
On the COMS:COM1, COM2, NAV1 and NAV2 has a coarse digit (typ MHz) and fine digit (typ kHz). For these I will be able to get by by only using 0/1.
However, ADF and IDE has 4 digits and to use them I use 0/1/2/3.
So to use both COMS,NAV,ADF and IDE from the same switch I was forced to use 0/1/2/3. For ADF and IDE 0 sets the first digit 1 sets the second and so on. I then use for COMS and NAV the fine setting is 0/2 while the coarse setting is 1/3.

I like your recommendation on double encoders - I still need to think how and where I will implement it though.

Your plan on the rotary swtiches however, is great!!! I will definitely implement and reduce my offsets and make all of it much simpler.

Thanks so much.
2019-04-04 20:27
Go to page 1Go to page 012Go to page 2Go to page 2