Jump to content
The simFlight Network Forums

We'll need offsets for 8.33kHz radios


Recommended Posts

Posted
6 hours ago, activex said:

We'll we have support for for 8.33kHz radios? 

FSUIPC7 already supports the 8.33KHz frequency range via the 32bit int offsets (e.g. 05C4,05C8, 05CC, 05D0).

However, it seems that the MSFS SDK does not yet support this. This has already been raised with Asobo.

  • 4 weeks later...
Posted

The Hz/int offsets are already working for reading, for writing a 8.33 frequency I'm using a workaround by setting the frequency to the nearest lower 25kHz frequency via the standard radio offsets and then calling the control for radio increase until it matches the correct 8.33 frequency. This works quite well.

Simplified example based on C#, but should be easily adaptable to LUA or any other language:

double freq = 122.385; // example freq
int freqKhz = (int)(freq * 1000); // 122385
int nextSmaller25 = (freqKhz / 25) * 25; // 122375
int remainder25 = freqKhz % 25; // 10
int steps = remainder25 / 5; // 2
if (nextSmaller25 >= 118000 && nextSmaller25 < 137000 && steps <= 3 && remainder25 % 5 == 0) // is valid 8.33 freq?
{   
    string legacy4digit = nextSmaller25.ToString().Substring(1, 4); // 2237
    => write legacy4digit as BCD to COM offset (e.g. to 0x311A for COM1 standby)
    for (int i = 0; i < steps; i++) // 2 times
    {
        => call control for radio fract increase, e.g. 65639 (COM_RADIO_FRACT_INC) for COM1
    }
}

 

  • Like 1
  • 5 weeks later...
Posted

Note that the latest version of the MSFS SDK has new controls for use with 8.33KHz frequency spacing. I have added these to the version in the version posted in the following topic, and have also updated offsets 05C4,05C8, 05CC & 05D0 to use these new controls: 

John 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.