• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

ADF ident sound problem

DragonflightDesign

Resource contributor
Messages
1,086
Country
northernireland
In that... I can't turn it off!! I have tried
Code:
trigger_key_event(KEY_RADIO_ADF_IDENT_DISABLE, 0);
trigger_key_event(KEY_RADIO_ADF_IDENT_TOGGLE, 0);   // After checking for an 'on' state
trigger_key_event(KEY_RADIO_ADF_IDENT_SET, 0);
To check for the on/off state, I've been using
Code:
double getADFSound(int adf_number)
{
    double data = 0;

    if (adf_number == 1)execute_calculator_code("(A:ADF SOUND:1,Bool)", &data, NULL, NULL);
    if (adf_number == 2)execute_calculator_code("(A:ADF SOUND:2,Bool)", &data, NULL, NULL);
    return data;
}
where (I've assumed) that a return of zero means that the ident is off. I must be doing/missing something really stupid - anyone know what it is? I can catagorically state that there is nowhere else in the code that the ADF is being set/unset/whatever.
 
Messages
542
Country
australia
This is probably of no help , but this is what I use in xml to toggle ADF ident sound ON or OFF , and it works .
Code:
      <Area Left="216" Right="250" Top="0" Bottom="32">
            <Click Event="RADIO_ADF_IDENT_TOGGLE"/>
            <Cursor Type="Hand"/>
         </Area>

Cheers
Karol
 

DragonflightDesign

Resource contributor
Messages
1,086
Country
northernireland
Thanks Karol, but I don't do XML! 😁

I just discovered something really odd: if I change to an avatar (e.g. Army infantry) the ADF still sounds... Thart suggests a default setting but not one I can find. Also; this is a clean install of P3Dv5.1 with no addons.
 
Messages
440
Country
us-wisconsin
One possibility, this has occurred on another aircraft I was working on.
The switch has its own bool variable for animation etc.. then : (in pseudo code)
If the switch = 1 then (KEY_RADIO_ADF_IDENT_SET, 1) else (KEY_RADIO_ADF_IDENT_SET, 0)
Terrible.. It was also a flooding situation so.. Made a new one :)

You could see if your radio is doing this by using the FSUIPC logging, non-axis events.. If it's flooding, you'll know why.
This is particularly common in older radio gauges, there was no read variable to the ADF set at the time.
 
Messages
440
Country
us-wisconsin
Looked a little deeper.. Maybe ADF2 is tuned and picking up something?

KEY_RADIO_ADF_IDENT_DISABLE
KEY_RADIO_ADF_IDENT_ENABLE
KEY_RADIO_ADF_IDENT_SET
KEY_RADIO_ADF_IDENT_TOGGLE
KEY_RADIO_ADF2_IDENT_DISABLE
KEY_RADIO_ADF2_IDENT_ENABLE
KEY_RADIO_ADF2_IDENT_SET
KEY_RADIO_ADF2_IDENT_TOGGLE
 

DragonflightDesign

Resource contributor
Messages
1,086
Country
northernireland
Flooding was one thing I thought of. Both have a check at the beginning - looks like this:
Code:
if (getADFSound(adf_number)trigger_key_event(KEY_RADIO_ADF(x)_IDENT_SET, 0);
That looks right, but doesn't mean I haven't missed something somewhere. Also, try tuning two ADFs to the same frequency. There's a 'Doppler effect' as the ident signal kicks off and you can definately hear two separate idents.
 

DragonflightDesign

Resource contributor
Messages
1,086
Country
northernireland
Arrrrrrr stooopiddd. No audio panel declared in the aircraft.cfg file.

- no audio panel = permanent ident on
- audio panel = you can then turn it on and off

Personally I'd class that as a bug in the sim as logic says no audio panel = no audio. But what do I know... 😖 :D
 
Messages
112
Country
france
Congratulations - that was a tough one...
Gérard
 
Last edited:
Top