PDA

View Full Version : Analog trim with ministick (Pro Throttle) for IL2



Kolmo
6th July 2009, 08:00 PM
Hi, this is my first post. :blush:

I'd like to share this little piece of code with you. It's just a way to use the analog ministick in the Pro Throttle for trimming in IL2.


script
//intento TRIM con Ministick

a1=(128-js1.a2)/10; a2=(js1.a2-128)/10;
if (js1.b1) then cms.a2=128; endif //reset trim

if ([js1.a2>130]) then cms.a2=cms.a2+a2;endif
If ([js1.a2<126]) then cms.a2=cms.a2-a1;endif

if ([cms.a2<0]) then cms.a2=0; endif
if ([cms.a2>255]) then cms.a2=255; endif

endScript



Suggestions are welcome. :)

NichtLanden
19th July 2009, 05:19 PM
I check this script and it don't like me - impossible accuracy trimm Y axis in IL2...
Who how use trimm X and Y axis in IL-2?
Early I had Saitek X-52 and used for trimming axis two resitors on Saitek Throttle
Now I don't know what me make with triiming axis X and Y on FighterStik....I read CH help file - me offer use aututrim function (Scripting examples)? Anybody does use autotim for IL-2?
Can I clik any buttons reduce or increase TrimElevator or TrimRuder or TrimmEleron throught press button counter or time of pressed counter? I don't find this algoritms and functions in CH Controm Master Help?
How I can convert time of pressing button or number of pressing buttons to cnange axis values?

USMC_RS_M_M
6th August 2009, 08:26 PM
Try using mouse scroll wheel for precise elevator trim. I am using a hat buttons 6 and 8 on my throttle for yaw (rudder) trim. I have not set up aileron trim. The cms code for yaw follows uses PW/duty cycle model to tweak sensitivity:
TIMER( INTERVAL, d8, 30, 10 ) = js1.b8;
cms.b12 = d8; // Yaw Left Trim
TIMER( INTERVAL, d9, 30, 10 ) = js1.b6;
cms.b13 = d9; // Yaw Right Trim

NichtLanden
11th November 2009, 10:55 PM
Now I use next script for aileron trimming though buttons on PT


TIMER ( INTERVAL, D1, 1, 1 ) = JS2.B7;
TIMER ( INTERVAL, D2, 1, 1 ) = JS2.B5;

IF (D1) THEN
CMS.A2 = CMS.A2 + 1;
IF( [ CMS.A2 > 255 ] ) THEN // If the result is too high then
CMS.A2 = 255; // set it to the maximum allowable
ENDIF
ENDIF

IF (D2) THEN
CMS.A2 = CMS.A2 - 1;
IF( [ CMS.A2 < 0 ] ) THEN // If the result is too low then
CMS.A2 = 0; // set it to the minimum allowable
ENDIF
ENDIF

but this script doesn't get me accuracy precision - I don't coach accuracy horizontal flying - the aircraft either little rising, or little downing.....
What can I do for accuracy horizontal (constant Y axis values) trimming? I fly only Il2 only fighter (sometime fighters with bombs).

Sokol_1
12th November 2009, 12:53 AM
NichtLanden

Use one HAT for this, in IL-2 buttons is more accurate than axis for trim.
Mini stick axis have small course to this whit precision.

Sokol1

NichtLanden
12th November 2009, 05:37 PM
NichtLanden
Use one HAT for this, in IL-2 buttons is more accurate than axis for trim.
Mini stick axis have small course to this whit precision.
Sokol1
=====================================
I don't use ministick on PT, I use buttons for trimming....I try tried with Kolmo script - no accuracy, no precision....
But HAT it's the four position switch:):)
I can't use mouse wheel - CH have to make precision trimming thought CM

madrebel
14th December 2009, 01:30 AM
Hi, this is my first post. :blush:

I'd like to share this little piece of code with you. It's just a way to use the analog ministick in the Pro Throttle for trimming in IL2.


script
//intento TRIM con Ministick

a1=(128-js1.a2)/10; a2=(js1.a2-128)/10;
if (js1.b1) then cms.a2=128; endif //reset trim

if ([js1.a2>130]) then cms.a2=cms.a2+a2;endif
If ([js1.a2<126]) then cms.a2=cms.a2-a1;endif

if ([cms.a2<0]) then cms.a2=0; endif
if ([cms.a2>255]) then cms.a2=255; endif

endScript

Suggestions are welcome. :)
what exactly does this do and how do i map it?

Bob Church
14th December 2009, 02:17 AM
Hi madrebel,

Add the CMS Controls to your map. Just click the "Add" button (got a red "+" on it), and add it, you'll get a CMS Controls tab tagged onto the end of your map. That will make the CM Editor available, open that and you'll see an empty script, just some comments at the top and then the "script" and "endScript" statements. Copy and paste the section of the above script in between those two statements. Make sure you only have one "script" and one "endScript".

The CMS.A2 is Axis 2 on the CMS Controls tab. That will need to be assigned, I can't tell whether he's going to the actual axis or a trim input in the sim. If it's the actual axis, you need to clear that axis from wherever it comes from now (set it to NONE and NONE) or you'll get a control conflict when you try to download.

Hope this helps!

Best regards,

- Bob

The StickWorks
http://www.stickworks.com