Jump to content
Sign in to follow this  
LawnDart

C#: All I want to do is send a "1" to AUTOPILOT_MASTER

Recommended Posts

...that's it....I've read a lot of posts here, read the docs, but sending a simple "1" or "0" is about as clear as mud. Bear in mind, my programming skills are rusty at best.I don't expect anyone to write my code for me. However, like anything in life, some things are difficult if not impossible until you know how to do it.I know that I have to use "TransmitClientEvent", but what about all that other stuff to make this one line function properly?Ray


Ray S.

 

Check out my aviation portfolio:

http://scottshangar.net

Share this post


Link to post
Share on other sites

I'm finishing up my first project for FSX, but after I release that, I'll wrap up my C# tutorial for SimConnect.

Share this post


Link to post
Share on other sites
Guest steels214

Well, here's how I did the Avionics master in c if it helps at all.SimConnect_MapClientEventToSimEvent(hSimConnect, KEY_EVENT_AVIONICS_TOGGLE, "TOGGLE_AVIONICS_MASTER"); SimConnect_TransmitClientEvent(hSimConnect, 0, KEY_EVENT_AVIONICS_TOGGLE, 0,SIMCONNECT_GROUP_PRIORITY_STANDARD, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); -------------------------------------------I'm sure someone will correct me if I'm wrong. But unless otherwise specified, you will use a 0 for a toggle switch. The dme select says to use (1,2), thusSimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_DME_SELECT, "DME_SELECT");SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_DME_SELECT, 1,SIMCONNECT_GROUP_PRIORITY_STANDARD, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);andSimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_DME_SELECT, 2,SIMCONNECT_GROUP_PRIORITY_STANDARD, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);Hope this helps a little.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...