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
pilota57
From: Bolzano, Italy
Posts: 60
Supporter
Dear Mobiflight Team,
i am proceeding with build my first panel and all is working well at now.

Now I like to improve the Transponder:
Trasponder code appears in the LCD display and I set it via four buttons (1000, 100, 10,1) as you can see in image:
https://drive.google.com/file/d/1aGsAMviOlbj-ncu5sVriBOR4fZdIF9kU/view?usp=sharing

Today I discovered the Transponder State Offset 0B46 (Int, 1)
TRANSPONDER STATE: 0 = Off, 1 = Standby, 2 = Test, 3 = On, 4 = Alt, 5 = Ground
and display it in lower right corner (as You can see in the previous image.

Now I would like to change the Transponder Mode with an encoder and I set an Output that "manipulate" the 0B46 Offset with steps: (turn left) $-1 and (turn right) $+1.
I put one Comparison in the input that reads the offset status: if current value is => 6 set it to 0 (zero).
By turning the encoder the LDC shows me the Mode from 0 to 5 and from 5 to 0 (zero) and also the Transponder change the Mode in the Simulator and I verify that also in the Title Bar where I fit the FSUIPC7 offset log
Image:
https://drive.google.com/file/d/1vSmouY7DeHTDgutFtedvuPzYBpiSGq08/view?usp=sharing

The problem is that the Mode value for the offset in the simulator after the step 5 goes 6-7-8-9-10....etc. If I turn left the encoder the Mode value in Simulator goes to 0 (zero).
On the LCD display the Offset value goes correctly from zero to 5 and vice versa.

The question is: How can I STOP the Offset counter at 5 in simulator ?

And very LAST question: it is possible to replace in the LCD Display the numbers 0, 1, 2, 3, 4, 5 (Offset 0B46 state) with strings like "Off", "StBy", "Test", "On", "Alt", "Ground" (the Transponder corresponding Modes) ?

Thanks in advance for Your suggestions
[Last edited by pilota57, 2020-10-30 20:04]
Fuarce Friûl
2020-10-30 18:48
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

iconpilota57:


Now I would like to change the Transponder Mode with an encoder and I set an Output that "manipulate" the 0B46 Offset with steps: (turn left) $-1 and (turn right) $+1.
I put one Comparison in the input that reads the offset status: if current value is => 6 set it to 0 (zero).



That sounds like a misstake.... Cause a INPUT have no comparison Page.
Pretty sure you include this entry in the OUTPUT Config that is used finaly as a placeholder in your Display !

That also explane your situation.... Your OUTPUT work fine, cause here you say " If Offset is 6 or greater" show 0 .


Solution: Your idea is correct BUT it must be included in the INPUT Config for the Encoder to send the correct Value to the Sim !
For ON LEFT you use NOT $-1 ..... You must use : if($=0,5,$-1) ..... Means if Current Value is "0" then this left turn should set to 5. If NOT ( So Value is 1,2,3,4 or 5) it send $-1 ,
For ON RIGHT you say : if($=5,0,$+1) .... So If 5 then jump to 0 .... Else Add +1 to current value.

**************
About last Question with Strings. YES this is possible. Need a little advanced Formula.
If you tell me exactly what words are need for the 6 Values i can build the formula for you !
Good Luck !
2020-10-31 16:53
Avatar
pilota57
From: Bolzano, Italy
Posts: 60
Supporter
iconpizman82:


About last Question with Strings. YES this is possible. Need a little advanced Formula.
If you tell me exactly what words are need for the 6 Values i can build the formula for you !



As usually: thanks for support Piz.
The needed strings-words are the transponder modes corresponding with the Offset 0B46 status:
0 = Off
1 = StandBy
2 = Test
3 = On
4 = Alt
5 = Ground

Thanks for the formula und Schönen Sonntag
Ciao
Fuarce Friûl
2020-10-31 17:33
Avatar
pilota57
From: Bolzano, Italy
Posts: 60
Supporter
iconpizman82:


That sounds like a misstake.... Cause a INPUT have no comparison Page.
Pretty sure you include this entry in the OUTPUT Config that is used finaly as a placeholder in your Display !
That also explane your situation.... Your OUTPUT work fine, cause here you say " If Offset is 6 or greater" show 0 .


Hi Piz, you are right: obviously the Precondition is in the Output; my mistake.

iconpizman82:

Solution: Your idea is correct BUT it must be included in the INPUT Config for the Encoder to send the correct Value to the Sim !
For ON LEFT you use NOT $-1 ..... You must use : if($=0,5,$-1) ..... Means if Current Value is "0" then this left turn should set to 5. If NOT ( So Value is 1,2,3,4 or 5) it send $-1 ,
For ON RIGHT you say : if($=5,0,$+1) .... So If 5 then jump to 0 .... Else Add +1 to current value.


And, as usually, works fine. Thanks
Fuarce Friûl
2020-10-31 18:37
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconpilota57:


The needed strings-words are the transponder modes corresponding with the Offset 0B46 status:
0 = Off
1 = StandBy
2 = Test
3 = On
4 = Alt
5 = Ground



For only 2 different "strings" we could use the Comparison Tab in a easy way.....

Like IF Value =0 ..... THEN: Off ...... ELSE Standby

But in your case we need a lot of additional situations.... So we need to wokr with a formula. Here you need to know the >> ' << Symbol is the Key. All that is written between those symbols is a STRING..... But this will work in Mobiflight only in Compare.... NOT in Transform !
So for example 'HELLO' result in HELLO on your LCD . ( That symbol is above the # in the German Keyboard)

Solution:
The first part we can do with the THEN Field..... So we say in Compare : IF Value =0 THEN Off
In the ELSE Field we use a long formula with a lot of "ELSEIF" to fit all other situations..... NOTE: "0" is no longer possible cause it is still handle by the THEN.

Use in ELSE : if($=1,'StandBy',if($=2,'Test',if($=3,'On',if($=4,'Alt','Ground'))))

NOTE: The last Value "5" is not used itself cause it´s the ELSE in the last Condition.... If Value is not 0,1,2,3 or 4 then it MUST be 5 finaly !

Please Test and report experience..... Hopefully i wrote it correctly !
Good Luck !
2020-11-01 00:37
Avatar
pilota57
From: Bolzano, Italy
Posts: 60
Supporter
iconpizman82:

iconpilota57:


The needed strings-words are the transponder modes corresponding with the Offset 0B46 status:
0 = Off
1 = StandBy
2 = Test
3 = On
4 = Alt
5 = Ground



For only 2 different "strings" we could use the Comparison Tab in a easy way.....

Like IF Value =0 ..... THEN: Off ...... ELSE Standby

But in your case we need a lot of additional situations.... So we need to wokr with a formula. Here you need to know the >> ' << Symbol is the Key. All that is written between those symbols is a STRING..... But this will work in Mobiflight only in Compare.... NOT in Transform !
So for example 'HELLO' result in HELLO on your LCD . ( That symbol is above the # in the German Keyboard)

Solution:
The first part we can do with the THEN Field..... So we say in Compare : IF Value =0 THEN Off
In the ELSE Field we use a long formula with a lot of "ELSEIF" to fit all other situations..... NOTE: "0" is no longer possible cause it is still handle by the THEN.

Use in ELSE : if($=1,'StandBy',if($=2,'Test',if($=3,'On',if($=4,'Alt','Ground'))))

NOTE: The last Value "5" is not used itself cause it´s the ELSE in the last Condition.... If Value is not 0,1,2,3 or 4 then it MUST be 5 finaly !

Please Test and report experience..... Hopefully i wrote it correctly !



Gut Morgen Piz and thanks.
Later I will try and report You the results.
Probably today will be the last free Sunday to go outside before lockdown here in Italy and here in Sicily is a funny sunny day.
I hope good luck for all.
Bye
Fuarce Friûl
2020-11-01 08:45
Avatar
pilota57
From: Bolzano, Italy
Posts: 60
Supporter
iconpizman82:


The needed strings-words are the transponder modes corresponding with the Offset 0B46 status:
0 = Off
1 = StandBy
2 = Test
3 = On
4 = Alt
5 = Ground

For only 2 different "strings" we could use the Comparison Tab in a easy way.....

Like IF Value =0 ..... THEN: Off ...... ELSE Standby

But in your case we need a lot of additional situations.... So we need to wokr with a formula. Here you need to know the >> ' << Symbol is the Key. All that is written between those symbols is a STRING..... But this will work in Mobiflight only in Compare.... NOT in Transform !
So for example 'HELLO' result in HELLO on your LCD . ( That symbol is above the # in the German Keyboard)

Solution:
The first part we can do with the THEN Field..... So we say in Compare : IF Value =0 THEN Off
In the ELSE Field we use a long formula with a lot of "ELSEIF" to fit all other situations..... NOTE: "0" is no longer possible cause it is still handle by the THEN.

Use in ELSE : if($=1,'StandBy',if($=2,'Test',if($=3,'On',if($=4,'Alt','Ground'))))

NOTE: The last Value "5" is not used itself cause it´s the ELSE in the last Condition.... If Value is not 0,1,2,3 or 4 then it MUST be 5 finaly !

Please Test and report experience..... Hopefully i wrote it correctly !



Dear Piz,
I have no doubt that your suggestion is working fine.

Here is a short video with my transponder mode change knob in action; look at Sim transponder on my poor display and my actions on Transponder Mode Knob and Radio Stack Display page.

https://drive.google.com/file/d/1cZDwOu6oZP1TpSaUBArSMfOs3ZGeMP9g/view?usp=sharing

With this trick the LCD will be very useful for some others info's and actions via multipage.

Thanks a lot
Fuarce Friûl
2020-11-01 18:29
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Nice. :thumbup:

I see you understand the logic and you "rework" the formula to get shorter Terms.
And your right, too.... This can be used for different things.... For example to show "Gear UP, Gear DOWN or Gear TRANS.
Good Luck !
2020-11-02 11:32
Avatar
pilota57
From: Bolzano, Italy
Posts: 60
Supporter
iconpizman82:

Nice. :thumbup:

I see you understand the logic and you "rework" the formula to get shorter Terms.
And your right, too.... This can be used for different things.... For example to show "Gear UP, Gear DOWN or Gear TRANS.


Or CAS messages...und so weiter.
Thank You
Bye
Fuarce Friûl
2020-11-02 12:00
icon