Jump to content

Getting Serial Port Data Into FSX


Recommended Posts

Hi,

I'm a clueless noob to SimConnect, and I've been banging my head against the SimConnect API for days trying to get integer values from a non-keyboard-mouse-joystick serial device into FSX to control the yoke of an aircraft. I've got some code in C++ that reads the values into a console as FSX runs my client, but I'm at a loss as to how I can affect the yoke.

Is doing this even possible using SimConnect (if so, please tell how or where I can find the solution), and if not, will FSUIPC solve my problem? The device

doesn't come with Windows drivers. :(

Link to comment
Share on other sites

I've been banging my head against the SimConnect API for days trying to get integer values from a non-keyboard-mouse-joystick serial device into FSX to control the yoke of an aircraft.

You surely mean control the elevator and ailerons? A yoke is an input device such as the one you are trying to interface.

I've got some code in C++ that reads the values into a console as FSX runs my client, but I'm at a loss as to how I can affect the yoke.

Instead of thinking "affect the yoke" think "affect the aircraft controls". A yoke controls two sets of surfaces on an aircraft -- elevator and ailerons. FS's controls for these are called, respectively, AXIS_ELEVATOR_SET and AXIS_AILERONS_SET. You can send values for these using SimConnect's "SimConnect_TransmitClientEvent" after assigning an ID to these Sim Events by using "SimConnect_MapClientEventToSimEvent". The associated parameter values for these vary from -16383 to +16383, with zero being straight and level.

Regards

Pete

Link to comment
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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.