Unable to update Radio Freq in FS2020 or fSX

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
JohnF
Posts: 45
Joined: Tue Feb 02, 2021 10:51 am

Unable to update Radio Freq in FS2020 or fSX

#1 Post by JohnF »

I have treied sending the following in Mhz, Khz, and Hz still radio displays 0.00

fs2020_event("COM_RADIO_SET_HZ", 121500000) I have also sent this in a variable but to no avail. Anyone any ideas?? :geek: :evil:

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: Unable to update Radio Freq in FS2020 or fSX

#2 Post by JackZ »

The value should not be in the infamous « BCD format » ?
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Unable to update Radio Freq in FS2020 or fSX

#3 Post by Ralph »

That's what was thinking as well, that used to be the case for FSX.

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: Unable to update Radio Freq in FS2020 or fSX

#4 Post by JackZ »

Converting decimal to BCD seems to be a nightmare.
Trying to find some algorithms on the Net to translate into Lua, kinda tricky
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

JohnF
Posts: 45
Joined: Tue Feb 02, 2021 10:51 am

Re: Unable to update Radio Freq in FS2020 or fSX

#5 Post by JohnF »

With Hz on end it should update in Hz, for instance sending 1215500000 should work, but it does'nt. :o

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: Unable to update Radio Freq in FS2020 or fSX

#6 Post by JackZ »

Try this:

Code: Select all

freq=122.125
res=freq*10000*100
fs2020_event("COM_RADIO_SET_HZ",res)
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

JohnF
Posts: 45
Joined: Tue Feb 02, 2021 10:51 am

Re: Unable to update Radio Freq in FS2020 or fSX

#7 Post by JohnF »

Radio in cockpit displays 0.00 instead of frequency sent.

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Unable to update Radio Freq in FS2020 or fSX

#8 Post by Ralph »

Download the Flight Illusion Bendix Kind radio and you'll see how it works.

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: Unable to update Radio Freq in FS2020 or fSX

#9 Post by JackZ »

JohnF wrote: Sat Jul 30, 2022 12:03 pm Radio in cockpit displays 0.00 instead of frequency sent.
The code I published works fine on my PC with with MSFS. Check if you don’t have any addon in the community folder that might interfere first.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Unable to update Radio Freq in FS2020 or fSX

#10 Post by Sling »

JohnF wrote: Sat Jul 30, 2022 11:21 am With Hz on end it should update in Hz, for instance sending 1215500000 should work, but it does'nt. :o
You have one too many zeros.

Post Reply