Sign in to follow this  
Guest scotthendry

Setting the radio frequencies

Recommended Posts

Can anyone tell me what the format of dwVal should be when using the KEY_COM_STBY_RADIO_SET event via simconnect? The SDK help file says it should be BCD Hz, but there's only 8 BCD digits in a doubleword and that's not enough to specifiy the frequency in Hz. I tried 0x00127975 and 0x12797500 neither had any affect.Thanks

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>Can anyone tell me what the format of dwVal should be when>using the KEY_COM_STBY_RADIO_SET event via simconnect? The SDK>help file says it should be BCD Hz, but there's only 8 BCD>digits in a doubleword and that's not enough to specifiy the>frequency in Hz. I tried >0x00127975 and 0x12797500 neither had any affect.The documentation is, ahem, wrong, it seems.The Key Events for radios take the same 16-bit BCD encoding they always have done, in all versions of FS since I can remember, and the same format used in the FSUIPC offsets. For 127.975 you use 0x2797. The initial 1 is assumed and the 50Hz bits are assumed for those ending in 2 and 7.The Sim Vars return the frequencies in the same form if you specify "Frequency BCD16" as the unit. The "BCD16" format is the proper name for the ones used by the Events.On the other hand, the KEY_ADF_COMPLETE_SET one uses 0x12345000 for 1234.5, and similarly its Sim Var is "Frequency ADF BCD32".The more things change the more they stay the same, eh? RegardsPete

Share this post


Link to post
Share on other sites

Ahh Pete. You've come to my rescue once again.:-beerchug

Share this post


Link to post
Share on other sites

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
Sign in to follow this