activex Posted November 10, 2020 Report Posted November 10, 2020 We'll we have support for for 8.33kHz radios?
John Dowson Posted November 10, 2020 Report Posted November 10, 2020 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.
jaxx Posted December 5, 2020 Report Posted December 5, 2020 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 } } 1
John Dowson Posted January 3, 2021 Report Posted January 3, 2021 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now