Jump to content

Write text to primary frequency from a EuroScope PlugIn


Recommended Posts

Hi all,

 

I am writing a Plugin for ES from which I need to send pilots a text message if they are flagged as text-only.

I am using DisplayUserMessage() to do this.

However somehow if I p[Mod - Happy Thoughts] the controller frequency as the handler name I get what seems to be a duplicate version of the frequency chat.

 

if (!ControllerMyself().IsValid())
           return;

       CGrountToAirChannel channel = GroundToArChannelSelectFirst();
       while (!channel.GetIsPrimary())
           channel = GroundToArChannelSelectNext(channel);

       std::stringstream ss;
       ss << std::fixed << std::setprecision(3) << channel.GetFrequency();
       DisplayUserMessage(ss.str().c_str(),
                          "",
                          str.c_str(),
                          true, false, false, false, false);

This yields the following result:

bwshNhC.png

But what I want to see is this:

JTRgSnE.png

Note the two seemingly identical voice handlers. Problem is the lower channel is the actual voice channel, and the upper one is a private chat of sorts to callsign 118.400, which does not exist.

 

I am starting to suspect that DisplayUserMessage() is not the way to go here.

Can anyone help me out on how to achieve on-frequncy message posting by a plugin?

 

Regards,

Arnoud

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...