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 11234Go to page 3Go to page 4
Avatar
kaborex
Posts: 37
ok. great.

Something strange is going on with my arduino though. Initially everything worked great and then mid flight my heading and altitude encoder starter behaving strangely.

the heading would increase by 10 and -10 everythime i change heading and the altitude would only change by 1000feet or -1000 feet. Strange as the heading is set to change by 1 and -1 and the altitude is set to change by 500 and 1000 (- or +)

Regards

Kaborex
2020-04-28 10:16
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3867
Supporter
Now we swap back to INPUT again

Please Confirm you use for Inputs the EventID`s .
Here normaly all should work.

If you use intead "offset" as typ then pretty sure your formula (input value) is not corrrect.

Tell us how you make your Input..... then we can check !
Good Luck !
2020-04-28 19:01
Avatar
kaborex
Posts: 37
I have tried both and still issues persist. It can work for one minute and start drifting again. this is the fourth time i have unplugged everything. getting a bit desperate now. It also appears when i turn everything off and come back values have changed. beggining to think it is hardware related.

I have the KY-40 encoders which i now know is not favoured here. Could that be the problem?

regards

Kaborex
2020-04-28 21:10
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3867
Supporter
You must split the situation between software and hardware.

Do you still know the "KEY SEND Testing" ?

Open a new Config file.... Create only a INPUT Device. Use your Encoder and define for LEFT Typ Keysend and use the "A" key. For RIGHT do the same and choose here Key "B".
Now open a Text Programm like Wordpad or editor.
RUN Mobiflight and SIM ( Or only Mobiflight but then you need to enable Offline Mode in the Settings so Keys are also send if no Sim is active)
Then klick on the Textprogramm so the cursor is active and you be able to write with your keyboard. ( Just write something to test if all if fine)
NOW Turn your encoder..... For every Left Turn detent it must write a A ..... For ever Rightturn it must write a B

With this test you can find out for example if your encoder make inputs by itself ( in case of wrong wirewrok e.g.)

Alternate is to activate LOGGING Mode in Mobiflight..... Then you see there in a Textfield below the Configs what Mobiflight do..... Every Input Signal is written there and also what command mobiflight execute in that case !


*******************

Summary: Check if Software or Hardware is the problem.... Then we can find a solution.
Good Luck !
2020-04-28 21:36
Avatar
kaborex
Posts: 37
I checked and the encoder works fine. I have disconnected everything and so far programmed 2 encoders that are working. I am slowly increasing to see if all five encoders work well without issue. Then only will I add one 7 segment display at a time. I have a feeling it is the displays causing the issue.

regards

Kaborex
2020-04-28 21:55
Avatar
kaborex
Posts: 37
Three encoders working fine so far. I am using event id for AP ALT. Is there a way to change the PARA so that I can have different rates of increase between "on left" "on left fast" "on right" and "on right fast".

I have tried a few numbers in the PARA section but only works well with on right and right fast but not on left.


Regards

Kaborex
2020-04-29 00:25
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3867
Supporter
Not mix up problems....

At first solve the issue then think about different rates! and by the way.... A Display can not create a wrong input 10 instead of 1 .

If you still confirm your hardware is fine then the problem simply is your config and you use wrong settings.
Why not tell us what you do..... Whats your settings for On Left and On Rigth and what aircraft do you use at the moment of testing !
Good Luck !
2020-04-29 06:54
Avatar
kaborex
Posts: 37
HI,

For example, on the IAS display I have the following:

FSUIPC

Autopilot-AP Air Speed Value-use

offset 0x07e2

int

bytes 2

mask value 0xFFFF BCD mode unticked

Tranforms ticked $



With the above the display has worked but then as i turn the encoder or use the mouse and turn the speed dial, it briefly displays the speed and in two to three clicks either blacks out or fills the whole screen with all sorts of numbers then blacks out. Also all four screens that came have a tendency to come on and off when I either touch or move them.

Regards

Kaborex
2020-04-29 10:59
Avatar
kaborex
Posts: 37
Forgot to say all encoders are working fine except for the screens.
2020-04-29 11:01
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3867
Supporter
You say some topic ago.....
iconkaborex:


the heading would increase by 10 and -10 everythime i change heading and the altitude would only change by 1000feet or -1000 feet. Strange as the heading is set to change by 1 and -1 and the altitude is set to change by 500 and 1000 (- or +)



This mean to me that also the SIM internal virtual Display swap by 10 ... isn´t it ??

But now you ask me again for the Displays..... So we talk about OUTPUT !!


Is the 10 instead of 1 problem already solved ??? OR Was this issue only on your real Display and in Sim all was fine ?

***********


I think you did a basic logic issue in your knowledge.
The Display and the Encoder are not combined through Mobiflight. So if you turn the Encoder then Mobiflight NOT tell the Diplay to increse for example.
ALL is done by the Offset:
The Display read a Offset and simply show that value.....
The Encoder send a command to the Sim ( Whatever via Offset-Write or EventID) and this will change the Sim internal function.

In Easy words.... The Encoder NOT change the Display.... It Change the Offset and the Display finaly show that Offset ! No Connection between this 2 devices !

************
Solution:

1. Wrong Transform
This is not the spot of the problem and basicly not create a issue BUT its wrong and can occure in problems in the future.
$ means the Current Value...... You say with enable transform you like to "change" the Value.... But then you say simply "$"
Means you like to change current value with current value..... makes no sense ! Just a additional unneeded working step for Mobiflight !

2. Electrical Issue !
7Seg Displays that show something else like "nothing" and "correct Number" like "8888888" or stupid segementmix are simply not installed correctly.
You pretty sure connect them improvisional with some wires. That will not work.
On every touching or little vibration you risk a Error and then you need to restart the Arduino and also Mobiflight to initialise it again.
Means just the vibration of your turning encoder or when your hand touch the panel occure in that problem.
Solution: Solder all Displays instead of Jumper wires..... And Problem is solved !
Good Luck !
2020-04-29 11:28
Avatar
kaborex
Posts: 37
I have done so many trials and cannot remember everything but I think you are onto something with the soldering of cables.

I did that to the encoders and they are working fine. I also stopped using the bread board as that has many loose connections. I will solder the 7 segment displays today and report back.


With regards to your question above

" is the 10 instead of 1 sorted?". Yes it is

I now also understand how the transform works. So $+ or minus a value will cause the increment or decrease.

In the event I'd section, can we change the parameters at all? It always says zero

Many thanks
[Last edited by kaborex, 2020-04-29 13:11]
2020-04-29 12:58
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3867
Supporter
In a "execute" Event its Zero in FSX .... But there also exist SET Events.... There the parameter is a value you like to set into the Sim ......
IN other AddOns like PMDG the parameter is a mouseaction..... So Leftclick got a number, rightclick, Mousewheel Up and down and so on.

So it can be zero but it not have to .
Good Luck !
2020-04-29 13:17
Avatar
kaborex
Posts: 37
So for FSx it is only execute therefore the value can only be 0? Am I understanding correctly?


regards

Kaborex
2020-04-29 13:25
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3867
Supporter
iconkaborex:

So for FSx it is only execute therefore the value can only be 0? Am I understanding correctly?



NO Cause i said....

iconPizman82:

In a "execute" Event its Zero in FSX .... But there also exist SET Events.... There the parameter is a value you like to set into the Sim




Simple example for Standard FSX

iconQuote:


COM2 RADIO WHOLE DEC 66436
COM2 RADIO WHOLE INC 66437
COM2 RADIO FRACT DEC 66438
COM2 RADIO FRACT INC 66440
COM2 RADIO SET 66442



The upper four with increase and decrease are simply Executes..... They do something in the sim..... so parameter is no matter and "0" work fine.... Maybe also 1,2,3,4,5 and so on.
The lower is a SET Event.... Here normaly the Parameter is the Frequency ( Without leading zero i think) ...... Simply tryout with a button and use parameter 2345 ..... If Frequency change to 123,45 then you know it.
Good Luck !
2020-04-29 16:48
Avatar
kaborex
Posts: 37
Ok so for certain things like the coms there is Set events. I say this because I could not find set events for AP Alt. All I can see is Alt Var Inc and Alt Var dec. This causes the Altidude to change by 1000 feet on every click of the encoder. I was hoping to be able to set it 500feet on slow and 1000 on fast click. I tried using FSUIPC but that did not work.

Regards

Kaborex
2020-04-29 17:28
Go to page 1Go to page 11234Go to page 3Go to page 4