Sign in to follow this  
picnic

Can't set TRIM values

Recommended Posts

Hope someone can help me, I'm trying to set ELEVATOR TRIM PCT and AILERON TRIM PCT. I'm using something like

simconnect.AddToDataDefinition(DEFINITIONS.ANALCONTROLS, "ELEVATOR TRIM PCT", "percent over 100", SIMCONNECT_DATATYPE.FLOAT32, 0.0f, SimConnect.SIMCONNECT_UNUSED);
to set it up and then writing 0.0f in the simconnect.SetDataOnSimObject() call but I get an expection 20, invalid data.C# I'm afraid, has anyone got anything I can try, spot my silly error?TIA PeteP.S. I have AILERON POSITION working as a percent using this technique.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>Hope someone can help me, I'm trying to set ELEVATOR TRIM PCT>and AILERON TRIM PCT. I'm using something likeBy my tests the ELEVATOR TRIM PCT SimVar is not writeable, I'm afraid. You will have to use Sim Event KEY_ELEVATOR_TRIM_SET, which of course uses a joystick-type value, -16384 to +16384.However, the AILERON TRIM PCT and RUDDER TRIM PCT SimVars seem to be writeable okay.RegardsPete

Share this post


Link to post
Share on other sites

Thanks Pete.Did you tell MS this? Says settable in the documentation!One thing I have discovered is the Joystick example in the SDK actually returns +-32K not 16K as stated in the docs. Do you know which is the real range?Ta Pete

Share this post


Link to post
Share on other sites

>Did you tell MS this?Yes, I sent a pair of documents listing all those which were writeable and all which aren't, of those I tested (which were most but not all). Those documents are also available on my Support Forum. I started those back in FSX Beta days and updated them for each release. Mostly they stayed the same but the documentation was changed! ;-)> Says settable in the documentation!Not in my copy it doesn't. Maybe you aren't using the updated documentation in the SP1 SDK release? Either that or you are confusing it with "ELEVATOR TRIM POSITION" which is in radians, not a percent. That is certainly writeable, as marked.>One thing I have discovered is the Joystick example in the SDK>actually returns +-32K not 16K as stated in the docs. Do you>know which is the real range?Which Sim Var? I've not looked at any examples. The values joysticks return depend on their drivers and the Windows calibration. I don't use Simconnect to read joysticks.RegardsPete

Share this post


Link to post
Share on other sites

>Not in my copy it doesn't. Maybe you aren't using the updated>documentation in the SP1 SDK release?You're dead right, too many PCT and getting myself confused.>Which Sim Var? I've not looked at any examples. The values>joysticks return depend on their drivers and the Windows>calibration. I don't use Simconnect to read joysticks.The joystick example uses ClientEvents to read joystick:0:XAxis and the other axis. I was only running it as I wanted to see the values. I'm reading the joystick from C# and plan to inject that into FSX but getting the range right is a good starting point ;)Off to look at your support forumCheers PeteEdit: Corrected my reading stupidity!

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