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
LauraDaXplora
Posts: 4
Hiya Everyone,

I'm after some help - and surely (hopefully) someone has done this before.

I want to use Rotary Encoder 1 to display different screens.
Rotary Encoder 2 to then adjust things.
I have push buttons on both encoders, as well as another button.
I'll be using a 16x2 display, but I'm testing...

Anyways
So I know how to save a variable into an address.

I want Rotary 1 to Change the freq it will show/change
Rotary 2 changes the values, and 3rd Button does the swap

If A = 0 to show Com 1,2 and Nav 1,2
If A = 1 Adjust Comm 1. Encoder 2 controls the #'s and the Rotary Encoder Button switches between Mhz/Khz 3rd Button does the swap.
If A = 2 Adjust Nav 1. Encoder 2 controls the #'s and the Rotary Encoder Button switches between Mhz/Khz 3rd Button does the swap.
If A= 3 Adjust Comm 2 Encoder 2 controls the #'s and the Rotary Encoder Button switches between Mhz/Khz 3rd Button does the swap.
If A = 4 Adjust Nav 2. Encoder 2 controls the #'s and the Rotary Encoder Button switches between Mhz/Khz 3rd Button does the swap.

So from what I can tell I need three variables. A and B & C (B switching between Mhz/Khz and C Freq Swaps).
Changing A I know how to do, but how could I change 2 and 3?
2021-06-23 13:11
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Your still on the right way..... I wonder why you stuck now!

First question is..... Do we need this. Here we need to think about the used Sim and AddOn.
If there is alerady a System in use ( e.g. a Advanced AddOn Aircraft that allow us to handle Coms and Navs with the same Encoder..... then we not need difficult Preconditions..... We would simply use THIS virutal System that already do what we need.....
So think about that!

To solution.

Rotary 1 us used to toggle between the "modes" . Lets say it used Offset 66C0 ....
If you use the Rotary itself you use something like On Left : if($=0,4,$-1) ..... On Right if($=4,0,$+1) (Pretty sure there exist also other systems)
If you use the "button" then you say just on Press the same like On right of the Encoder..... Then the Button toggle 0,1,2,3,4,0,1,2,3,4 and so on.

Button of Encoder 2 controll the "KhzMhz" Swap. We need another Offset.... Lets say 66C1
Here we just make a toggle.... On Press if($=1,0,1)
So we toggle a Value from 0 ,1,0,1,0,1, and so on. ( Thats indication for KhzMhz )

And for sure you need 2 Output Configs that READ these Custom Offsets.... So we can Handle them in Preconditions.

At last you need 8 different Input Configs for the Encoder2 ..... And 4 Different Input Configs for the Swap Button.
All you need now is a combined AND Precondition.

For example
MHZ Controll of COM1 is only allowed to work if "Output Config MODES" = 1 AND if "Output Config Khz/Mhz" = 0
KHZ Controll of COM1 is only allowed to work if "Output Config MODES" = 1 AND if "Output Config Khz/Mhz" = 1

MHZ Controll of NAV1 is only allowed to work if "Output Config MODES" = 2 AND if "Output Config Khz/Mhz" = 0
KHZ Controll of NAV1 is only allowed to work if "Output Config MODES" = 2 AND if "Output Config Khz/Mhz" = 1

I hope you understand!. If not ask more detailed where your stuck !
Good Luck !
2021-06-23 14:53
Avatar
LauraDaXplora
Posts: 4
Hiya!

Thanks for the answer - I seem to have it working.... Separately! Will try and combine them now.

I'll let you know how I go.
2021-06-23 15:44
Avatar
LauraDaXplora
Posts: 4
THANK YOU!!!

Thanks, that makes it a lot clearer now moving forward.
2021-06-23 16:05
icon