PDA

View Full Version : Not Enough Sliders? Make Them (Ch Only)



diomedes33
01-30-2005, 11:36 AM
I recently transitioned from an X-45 to all Ch. I love the new gear, but I was a little disspointed at my loss of rotaries. I started playing with the scripting code and got this to work quite well. I don't know if this has been done before, but I wrote it all from scratch.

I'll do a quick example on how to add Elevator/Aileron Control axies

<UL TYPE=SQUARE>
<LI> First you have to load all the devices and create a CMS device in your Ch Control Manager.
<LI> Setup the A1 and A2 axes as the x and y axies of a CMS# device. Make sure its not the same as your stick, but it should complain if you have a double binding.
<LI> If you're going to use the POV hat like me, you have to click on the check box that turns off the POV.
<LI> Add This code to the CMS Script
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
%DEFINE ELEV_TRIM A2
%DEFINE AILE_TRIM A3

%DEFINE delta_Axis A1

//AxisRate = (255*CHARACTER_RATE) / (TARGET_PERIOD)
//I believe that the axis rate can only be Integers so round up or down
//CHARACTER_RATE is defined in the first tab (defaults to 50 ms)
//TARGET_PERIOD is the time you want the axes to travel from full open to full close

%DEFINE COARSE_RATE 3 (255*0.050) / (4.25 sec)
%DEFINE MEDIUM_RATE 2 (255*0.050) / (6.375 sec)
%DEFINE FINE_RATE 1 (255*0.050) / (12.75 sec)

//Use the throttle mode to switch between Coarse/Medium/Fine
IF ([PROTHRMODE == 1]) THEN
delta_Axis = MEDIUM_RATE;
ELSE IF ([PROTHRMODE == 2]) THEN
delta_Axis = FINE_RATE;
ELSE
delta_Axis = COARSE_RATE;
ENDIF ENDIF

//Elevator Trim (uses POV hat on Stick)
SEQUENCE
WHILE(JS1.B25); //<--Change this binding to move the button
ELEV_TRIM = ELEV_TRIM - delta_Axis;
DELAY(1);
ENDSEQUENCE

SEQUENCE
WHILE (JS1.B29);
ELEV_TRIM = ELEV_TRIM + delta_Axis;
DELAY(1);
ENDSEQUENCE

//Aileron Trim
SEQUENCE
WHILE(JS1.B27);
AILE_TRIM = AILE_TRIM + delta_Axis;
DELAY(1);
ENDSEQUENCE

SEQUENCE
WHILE (JS1.B31);
AILE_TRIM = AILE_TRIM + delta_Axis;
DELAY(1);
ENDSEQUENCE

//Resets Trim to neutral using the pinky button on the stick
IF (JS1.B4) THEN
AILE_TRIM = 0;
ELEV_TRIM = 0;
ENDIF

//This may be overkill but it makes sure that the values stay with in the
//range -127 < Axis < 127 (for prop pitch switch to 0 < Axis < 255)
IF ([ELEV_TRIM < (-127 + delta_Axis)]) THEN ELEV_trim = -127; ENDIF
IF ([ELEV_TRIM > (127 - delta_AXis)]) THEN ELEV_TRIM = 127; ENDIF

IF ([AILE_TRIM < (-127 + delta_Axis)]) THEN AILE_TRIM = -127; ENDIF
IF ([AILE_TRIM > (127 - delta_Axis)]) THEN AILE_TRIM = 127; ENDIF

//Binds the axes to the second step
CMS.A1 = 127 + ELEV_TRIM;
CMS.A2 = 127 + AILE_TRIM;
<HR></BLOCKQUOTE>
<LI> Now save and load the profile, I copied this all from my script by hand, so if it complains about something check to make sure that there are some number of ( and [ as ] and ) and that there aren't any missing ;.
<LI> Note -- I have the Fighterstick and Pro-Throttle, you may have to adjust the bindings. JS1 = Stick and JS2 = Throttle for my setup. If you only have a ch throttle JS1 = throttle, I think.
<LI> Click on the CtrlManager Test button and select CMS1, you should be able to move the XY axis around using the hat, pressing on the micro-joy on the throttle will change the modes and you should see that indicator moving slower or faster accordingly.
<LI> Load up Il2, and then bind these new axes to the elevator and aileron trim like you would an other axis.
[/list]

If it doesn't work or something is confusing let me know, I'll go back through and make sure everything is correct.

diomedes33
01-30-2005, 11:36 AM
I recently transitioned from an X-45 to all Ch. I love the new gear, but I was a little disspointed at my loss of rotaries. I started playing with the scripting code and got this to work quite well. I don't know if this has been done before, but I wrote it all from scratch.

I'll do a quick example on how to add Elevator/Aileron Control axies

<UL TYPE=SQUARE>
<LI> First you have to load all the devices and create a CMS device in your Ch Control Manager.
<LI> Setup the A1 and A2 axes as the x and y axies of a CMS# device. Make sure its not the same as your stick, but it should complain if you have a double binding.
<LI> If you're going to use the POV hat like me, you have to click on the check box that turns off the POV.
<LI> Add This code to the CMS Script
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
%DEFINE ELEV_TRIM A2
%DEFINE AILE_TRIM A3

%DEFINE delta_Axis A1

//AxisRate = (255*CHARACTER_RATE) / (TARGET_PERIOD)
//I believe that the axis rate can only be Integers so round up or down
//CHARACTER_RATE is defined in the first tab (defaults to 50 ms)
//TARGET_PERIOD is the time you want the axes to travel from full open to full close

%DEFINE COARSE_RATE 3 (255*0.050) / (4.25 sec)
%DEFINE MEDIUM_RATE 2 (255*0.050) / (6.375 sec)
%DEFINE FINE_RATE 1 (255*0.050) / (12.75 sec)

//Use the throttle mode to switch between Coarse/Medium/Fine
IF ([PROTHRMODE == 1]) THEN
delta_Axis = MEDIUM_RATE;
ELSE IF ([PROTHRMODE == 2]) THEN
delta_Axis = FINE_RATE;
ELSE
delta_Axis = COARSE_RATE;
ENDIF ENDIF

//Elevator Trim (uses POV hat on Stick)
SEQUENCE
WHILE(JS1.B25); //&lt;--Change this binding to move the button
ELEV_TRIM = ELEV_TRIM - delta_Axis;
DELAY(1);
ENDSEQUENCE

SEQUENCE
WHILE (JS1.B29);
ELEV_TRIM = ELEV_TRIM + delta_Axis;
DELAY(1);
ENDSEQUENCE

//Aileron Trim
SEQUENCE
WHILE(JS1.B27);
AILE_TRIM = AILE_TRIM + delta_Axis;
DELAY(1);
ENDSEQUENCE

SEQUENCE
WHILE (JS1.B31);
AILE_TRIM = AILE_TRIM + delta_Axis;
DELAY(1);
ENDSEQUENCE

//Resets Trim to neutral using the pinky button on the stick
IF (JS1.B4) THEN
AILE_TRIM = 0;
ELEV_TRIM = 0;
ENDIF

//This may be overkill but it makes sure that the values stay with in the
//range -127 &lt; Axis &lt; 127 (for prop pitch switch to 0 &lt; Axis &lt; 255)
IF ([ELEV_TRIM &lt; (-127 + delta_Axis)]) THEN ELEV_trim = -127; ENDIF
IF ([ELEV_TRIM &gt; (127 - delta_AXis)]) THEN ELEV_TRIM = 127; ENDIF

IF ([AILE_TRIM &lt; (-127 + delta_Axis)]) THEN AILE_TRIM = -127; ENDIF
IF ([AILE_TRIM &gt; (127 - delta_Axis)]) THEN AILE_TRIM = 127; ENDIF

//Binds the axes to the second step
CMS.A1 = 127 + ELEV_TRIM;
CMS.A2 = 127 + AILE_TRIM;
<HR></BLOCKQUOTE>
<LI> Now save and load the profile, I copied this all from my script by hand, so if it complains about something check to make sure that there are some number of ( and [ as ] and ) and that there aren't any missing ;.
<LI> Note -- I have the Fighterstick and Pro-Throttle, you may have to adjust the bindings. JS1 = Stick and JS2 = Throttle for my setup. If you only have a ch throttle JS1 = throttle, I think.
<LI> Click on the CtrlManager Test button and select CMS1, you should be able to move the XY axis around using the hat, pressing on the micro-joy on the throttle will change the modes and you should see that indicator moving slower or faster accordingly.
<LI> Load up Il2, and then bind these new axes to the elevator and aileron trim like you would an other axis.
[/list]

If it doesn't work or something is confusing let me know, I'll go back through and make sure everything is correct.

Woof603
01-30-2005, 04:52 PM
Diomedes33, would you know how to bind the elevator trim to the mini stick on the CH usb throttle? Thanks.

diomedes33
01-30-2005, 06:04 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Woof603:
Diomedes33, would you know how to bind the elevator trim to the mini stick on the CH usb throttle? Thanks. <HR></BLOCKQUOTE>

Since the stick is self-centering, It would only trim, when you're thumb is on it.

How do you want it to work? I might be able to think of something.

ElAurens
01-30-2005, 07:02 PM
I have always wondered if it would be possible to replace that useless mini stick with rotary for elevator trim?

I don't use the confusing/cumbersome CH control stuff.

Targ
01-30-2005, 09:16 PM
I must be missing something here. My CH stick has these roteries on the base of the stick. It has a throttle wheel and the aileron and elevator wheels?

diomedes33
01-30-2005, 10:24 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Targ:
I must be missing something here. My CH stick has these roteries on the base of the stick. It has a throttle wheel and the aileron and elevator wheels? <HR></BLOCKQUOTE>

I don't know about the older ones, but on mine the elevator/aileron trim next to the stick changes the trim by adding to the output of the potentiometer on a hardware level.

I don't use a linear gain so this really screws with my aim and feel for the aircraft. Each time I adjust the trim, I get a whole new airplane.

I tried having elevator trim on the rotary for a couple weeks. I was always fumbling around for the wheel and had to use both hands to trim the plane. I also use the micro-joystick on the throttle to look around, so I don't like to let go of the throttle if I can help it.

I tried all of the ways I could think of:
Binding buttons to the trim keys (Playing a lot with Character rate and sequencing)
As you said using the trim wheels
And creating fake axies

I found that the axies worked really well, it is almost as good as having the rotaries back. It also allows me to keep my hand on the throttle so I can keep my SA. Since I spent so much time working and perfecting it, I thought I'd share what I had done in case someone else was experiencing the same difficulties.

I should probably add too that I don't use the trim to exploit anything. The only time I use trim in combat is to pull out of a steep dive in 109 or trim tail heavy before a dive so the aircraft will pull itself out naturally.

Targ
01-30-2005, 10:35 PM
Thanks for the reply http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif
I was not sure if this was an auto trim feature or what. Makes sense to me now, and makes sense as it is tough to use those wheels in the heat of battle not to mention no centering at all.
You should post this over at the ch hanger
CH Hanger (http://www.ch-hangar.com/forum/index.php?act=idx)

Xnomad
01-31-2005, 01:00 AM
To use the mini-stick as buttons just go into the control manager and select the minstick and uncheck the little box that says DirectX Mode, and then you should be able to assign buttons to each axis and direction.

I use the ministick left and right for increase and decrease prop pitch, and up and down for 0% and 100% prop pitch. It's handy to be able to drop the prop pitch to 0% very quickly for the many of the allied planes as it can help prevent you from overshooting.

Woof603
01-31-2005, 08:09 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Xnomad:
To use the mini-stick as buttons just go into the control manager and select the minstick and uncheck the little box that says DirectX Mode, and then you should be able to assign buttons to each axis and direction.

I use the ministick left and right for increase and decrease prop pitch, and up and down for 0% and 100% prop pitch. It's handy to be able to drop the prop pitch to 0% very quickly for the many of the allied planes as it can help prevent you from overshooting. <HR></BLOCKQUOTE>

Thanks, XNOMAD, I'll fool around with that and see what happens. And DIOMEDES33, I was hoping to use the mini stick for incremental trim changes as in RL. Am I dreaming? http://forums.ubi.com/images/smilies/16x16_smiley-very-happy.gif

flyingscampi
02-01-2005, 09:48 AM
Thanks for this post!

I've been hanging onto my X45 throttle because of the rotaries, I might change it now http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif