Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I got the SWS PC12 (instead of Carenado) and I'm running into a few issues with the trim (rudder and aileron fixed via Lvar).

1. ELEV_TRIM_UP/DN events via button are working, but they're very very slow. What's the best way to either increase the repeat rate or provide some value by which to inc/dec?

2. Aileron trim doesn't seem to work. Logging events and input events shows nothing when using the VC button and dragging mouse to change aileron trim. Anyone got this to work?

Posted

Any way to increment L:ELEVATOR_TRIM_PCT by some amount through presets, instead of just "setting" it. Is there some way to "read" the current value and then increment?

Posted

Ok, here's an ugly solution. Aileron and rudder trim percent work, but elevator is ignored. So I just send 25 ELEV_TRIM_DN/UP events for each button press. 🙂

SWS_PC12_Elevator_Trim_Up#0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP) 0 (>K:ELEV_TRIM_UP)
SWS_PC12_Elevator_Trim_Down#0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN) 0 (>K:ELEV_TRIM_DN)

I wish there was a looping construct in RPN code. I didn't see one.

Posted

For ailerons, the following works well:

SWS_PC12_Aileron_Trim_Left#(L:AILERON_TRIM_PCT) 1 - (>L:AILERON_TRIM_PCT)
SWS_PC12_Aileron_Trim_Right#(L:AILERON_TRIM_PCT) 1 + (>L:AILERON_TRIM_PCT)

 

Posted
10 hours ago, pilotjohn said:

Any way to increment L:ELEVATOR_TRIM_PCT by some amount through presets, instead of just "setting" it. Is there some way to "read" the current value and then increment?

If you need to know/read the value of anything (lvar, input event, simvar) then add it to an FSUIPC offset, You can then use FSUIPCs offset controls to set the value, including increment and decrement controls.

11 hours ago, pilotjohn said:

Any way to increment L:ELEVATOR_TRIM_PCT by some amount through presets, instead of just "setting" it. Is there some way to "read" the current value and then increment?

Are you sure thats an lvar? There is a simvar called ELEVATOR TRIM PCT, held in offset 0x0BC0. You can try assigning to the offset word inc/dec controls on that offset to control the trim. That is the normal method of getting a more responsive trim as you can specify the delta amount to your needs, or have a fast and slow assignments (i.e. different deltas) on different buttons (or virtual buttons).

There are also other solutions for trim - e,g, see 

 

 

Posted
1 hour ago, John Dowson said:

If you need to know/read the value of anything (lvar, input event, simvar) then add it to an FSUIPC offset, You can then use FSUIPCs offset controls to set the value, including increment and decrement controls.

Are you sure thats an lvar? There is a simvar called ELEVATOR TRIM PCT, held in offset 0x0BC0. You can try assigning to the offset word inc/dec controls on that offset to control the trim. That is the normal method of getting a more responsive trim as you can specify the delta amount to your needs, or have a fast and slow assignments (i.e. different deltas) on different buttons (or virtual buttons).

There are also other solutions for trim - e,g, see 

 

 

I'll have a look at these. Listing the vars through the WASM module didn't show an elevator trim pct but does have L:AILERON_TRIM_PCT. So maybe it's custom.

Posted
6 hours ago, John Dowson said:

What do you mean by this? If an lvar isn't listed, it doesn't exist (or hasn't been 'discovered' yet in a scan).

Maybe L:AILERON_TRIM_PCT is custom (defined by) the aircraft in questions, which is why there is no L:ELEVATOR_TRIM_PCT

Posted
12 hours ago, pilotjohn said:

Maybe L:AILERON_TRIM_PCT is custom (defined by) the aircraft in questions,

Almost all lvars are defined by the aircraf...
I still have no idea what you mean when you say 'custom'.

As I said, if FSUIPC does not list it, it is NOT an lvar 

Posted
5 hours ago, John Dowson said:

Almost all lvars are defined by the aircraf...
I still have no idea what you mean when you say 'custom'.

I mean that the aircraft defined it, and it's not the one listed int the SDK or offsets.

Posted
1 hour ago, pilotjohn said:

I mean that the aircraft defined it,

Almost all lvars are defined by the aircraft...

1 hour ago, pilotjohn said:

it's not the one listed int the SDK or offsets.

Well, there are no lvars added to offsets by default. And as I have said many times now, listing the lvars in FSUIPC will list ALL lvars available fromthe last scan. You can even reload and list lvars, which will list ALL lvars defined and available. If that lvar isn't there' it is NOT an lvar, 'custom' (which means nothing) or otherwise.

I don't understand why you think that is an lvar - why do you think that? How can you see it? How can you read/set/change it then?

Posted
1 hour ago, John Dowson said:

I don't understand why you think that is an lvar - why do you think that? How can you see it? How can you read/set/change it then?

AILERON_TRIM_PCT and RUDDER_TRIM_PCT are listed as Lvars, and the calculator above works on them. ELEVATOR_TRIM_PCT is not listed as an Lvar which is why obviously it's not doing anything.

2067531   [INFO]:     ID=1165 RUDDER_TRIM_PCT = 50.000000
2067531   [INFO]:     ID=1169 AILERON_TRIM_PCT = 0.000000
  

There also seem to be SimVars with these names, including an ELEVATOR_TRIM_PCT. I understand these are different and would not be referenced with L:

Posted
25 minutes ago, pilotjohn said:

AILERON_TRIM_PCT and RUDDER_TRIM_PCT are listed as Lvars, and the calculator above works on them. ELEVATOR_TRIM_PCT is not listed as an Lvar which is why obviously it's not doing anything.

2067531   [INFO]:     ID=1165 RUDDER_TRIM_PCT = 50.000000
2067531   [INFO]:     ID=1169 AILERON_TRIM_PCT = 0.000000
  

So its NOT an lvar. And it is not 'doing anything' as it doesn't exist. Juat because an lvar exists for the rudder trim and aileron trim, doesn't necessarily mean that one will exist for elevator trim. And if you list the lvars and its not there, it doesn't exist.

If you are thinking that it should exists as there are similar ones for rudder and aileron trim, then you are mistaken and are wasting both your and my time on this.
Use the facilities provided to determine what is available, don't guess.

 

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
×
×
  • 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.