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
FrankT
Posts: 5
Supporter
If the radio is set, and correct displayed, to a freq with the last digit with an 5, the display is always showing an zero.

127.875 is displayed on the 7-Segment 127.870

What am I doing wrong?

Frank
2021-01-09 14:27
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi Frank,

welcome to MobiFlight!

Why don't you use the search function here in the forum and look for COM and 6 digits?

Basically you haven't done anything wrong, just too little.

It depends on which simulator you are using. The older simulators still use the old 25kHz grid, the newer the 8.33kHz grid.
You seem to be using an older simulator or the wrong offset.

You can read about the offset for COM1 (0x034E) in the offset list:

034E 2 COM1 frequency, 4 digits in BCD format. A frequency of 123.45 is represented by 0x2345. The leading 1 is assumed.

But there is another offset for COM1: 0x05C4. The FSUIPC list says:

05C4 4 Active COM1 frequency in Hz (32 bit int)

Sequentially:
If you use the offset 0x034E you will only get 4 digits. At a frequency of 127,875, only 2787 is output. You can see this in MobiFlight in the FSUIPC value column. MobiFlight now provides the Transform line, which is now used.
If you only use these 4 digits, you would enter $ + 10,000. In the column output value then 12787 appears. By setting the decimal place accordingly, you get 127.87.

That should be the booth you took. But since you want to have another passage at the end, you can assume the following:
A 5 at the end is only available if there is a 2 or a 7 at the end of the FSUIPC value, i.e. for .x2 (5) or .x7 (5). The frequency always starts at 00, then 25, 50, 75 and again at 00 (the last digit is currently still "invisible"). If the frequency ends on 0 or 5, a 0 always follows.

This can now be implemented in the transform line:

if($%5=0,$*10+100000,$*10+100005)

If the FSUIPC value modulo 5 is 0, then multiply the FSUIPC value by 10 and add 100000, otherwise multiply the FSUIPC value by 10 and add 100005. The modulo calculation always results in the remainder of the division by the specified value.
With the above formula you should get your desired result.

In the event that you are working with the P3DV4 or higher, you can also use the offset 0x05C4 in FSUIPC and display it accordingly. You don't need the transform line here, as the frequency is already displayed in Hz.
Grüße,
Stephan (Time: UTC+2)
2021-01-09 18:12
Avatar
FrankT
Posts: 5
Supporter
Sorry, I did a search but not good enough I assume.

I am using FS20, and used your tip and it works.:blush: Thank you.

For the trouble I will donate a cup of coffee.

Regards,

Frank
2021-01-10 07:04
Avatar
devro2005
Posts: 6
iconStephanHo:

Hi Frank,

welcome to MobiFlight!

Why don't you use the search function here in the forum and look for COM and 6 digits?

Basically you haven't done anything wrong, just too little.

It depends on which simulator you are using. The older simulators still use the old 25kHz grid, the newer the 8.33kHz grid.
You seem to be using an older simulator or the wrong offset.

You can read about the offset for COM1 (0x034E) in the offset list:

034E 2 COM1 frequency, 4 digits in BCD format. A frequency of 123.45 is represented by 0x2345. The leading 1 is assumed.

But there is another offset for COM1: 0x05C4. The FSUIPC list says:

05C4 4 Active COM1 frequency in Hz (32 bit int)

Sequentially:
If you use the offset 0x034E you will only get 4 digits. At a frequency of 127,875, only 2787 is output. You can see this in MobiFlight in the FSUIPC value column. MobiFlight now provides the Transform line, which is now used.
If you only use these 4 digits, you would enter $ + 10,000. In the column output value then 12787 appears. By setting the decimal place accordingly, you get 127.87.

That should be the booth you took. But since you want to have another passage at the end, you can assume the following:
A 5 at the end is only available if there is a 2 or a 7 at the end of the FSUIPC value, i.e. for .x2 (5) or .x7 (5). The frequency always starts at 00, then 25, 50, 75 and again at 00 (the last digit is currently still "invisible"). If the frequency ends on 0 or 5, a 0 always follows.

This can now be implemented in the transform line:

if($%5=0,$*10+100000,$*10+100005)

If the FSUIPC value modulo 5 is 0, then multiply the FSUIPC value by 10 and add 100000, otherwise multiply the FSUIPC value by 10 and add 100005. The modulo calculation always results in the remainder of the division by the specified value.
With the above formula you should get your desired result.

In the event that you are working with the P3DV4 or higher, you can also use the offset 0x05C4 in FSUIPC and display it accordingly. You don't need the transform line here, as the frequency is already displayed in Hz.



I am also new in mobiflight and that was what I am looking for :)

FSUIPC offsets are:

FO side active : 05C8
FO side stdby : 05D0

size in bytes :4
w/o any transform input still not displaying as in Fslabs. For example 118.035 (in fslabs) is displayed as 118.030.

anyway, many thanks

Devrim
[Last edited by devro2005, 2021-04-21 18:03]
2021-04-21 17:54
icon