Jump to content

CH Products Owners: Must Read


Recommended Posts

  • 1 month later...

Here's another solution for CH owners. This script is designed to go with Ghosts map from the CH forums. You just need to unmap the trim button (JS1.B13)

 

When you have your controls where you want them just press the trim button (JS1.B13). The output from the controls stays in exactly the same position while you release pressure on the physical devices and then release the button. Now the center of the controls outputs the "trimmed values". If you want to cancel trim just use the shift and trim buttons at the same time.

 

This just adds an offset to the controls - nothing fancy.

 

 

//******************

 

script

 

//Purely hardware trimming for comparison

IF( NOT B1 ) THEN // If not trimming then

CMS.A1 = JS1.A1 + A1; // add the X offset to the stick X value

CMS.A2 = JS1.A2 + A2; // and add the Y offset to the stick Y value

CMS.A3 = JS4.A3 + A3;

ENDIF

 

IF (JS1.B13 AND JS2.B2) THEN //RESET HARDWARE TRIM

A1=0;

A2=0;

A3=0;

ENDIF

 

SEQUENCE

B1 = FALSE;

WAIT( JS1.B13 AND NOT JS2.B2); // Wait until Button 13 pressed

B1 = TRUE;

A1 = CMS.A1 - 128; // Calculate the X offset and save it in A1

A2 = CMS.A2 - 128; // Calculate the Y offset and save it in A2

A3 = CMS.A3 - 128;

WAIT( NOT JS1.B13 );

WHILE( [JS1.A1 < 138] AND [JS1.A1 > 118]); //Check that all controls are zero'd before applying trim

WHILE( [JS1.A2 < 138] AND [JS1.A2 > 118]);

WHILE( [JS4.A3 < 138] AND [JS4.A3 > 118]);

B1 = FALSE; // Apply trim

ENDSEQUENCE

 

 

 

endScript

 

PS: oops I forgot. I also had to map CMS.A1 to CM Device1 X axis, CMS.A2 to CM Device1 Y axis, and CMS.A3 to CM Device 4 Z axis


Edited by scatter

[sIGPIC][/sIGPIC]

Virtual Australian Air Force

Link to comment
Share on other sites

I would love to get the trim to work as described in the cougar forum.

 

I'm using Ice's cmc (available in hotas thread) because ghost's shows up with four cm divices in BS and has several periphials I don't.

 

I just have the stick, throttle and pedals and they all show as one device, and of course I've done all sorts of remapping.

 

What I'd like to see over at CH is some plain english instructions for those without the time to become experts in CH programming, where by such a trim function could be applied to which ever cmc we are using.

E8600 Asus P5E Radeon 4870x2 Corsair 4gb Velociraptor 300gb Neopower 650 NZXT Tempest Vista64 Samsung 30" 2560x1600

Link to comment
Share on other sites

How do I :

 

"You just need to unmap the trim button (JS1.B13)"

 

and which button is it ? :) .... CH scripting neophyte am I

 

I am using the Stick Coolie hat switch 12 O,clock button as the trimmer.

buttontrim.jpg


Edited by IvanK
Link to comment
Share on other sites

I use ghost's map even though I also only have fighterstick, throttle and pedals. The unused device is just ... unused. I prefer having separate devices as there are less limitations that way.

 

Now for IvanK (I'm just north of you on the central coast so we're in the same timezone BTW - if you have a problem drop by the vaaf (in my sig) and I'll talk you through the process step by step - I can help you over teamspeak if neccessary).

 

The trim button in Ghost's profile is B13 which is the forward position on the thumb hat switch lower on the joystick (not shown in your picture).

 

Now to your profile:

 

Assuming that your fighterstick is JS1 then the up position on your hat is JS1.B25

You should replace all references to JS1.B13 with JS1.B25 and make sure that for that position and the reset position) "use as POV" is off, "DX mode" is on, and DirectX device is "none".

 

Replace this line

IF (JS1.B13 AND JS2.B2) THEN //RESET HARDWARE TRIM

with

IF (JS1.B29) THEN //RESET HARDWARE TRIM

 

And finally get rid of any references to JS2.B2 in the script

 

As I said I'm happy to help people sort out the prob in their individual file if I've got the same physical gear (fighterstick, pro throttle, pro pedals). I'll look up the other profiles tomorrow as tonight I've had a couple of beers and don't trust myself to not make mistakes.


Edited by scatter

[sIGPIC][/sIGPIC]

Virtual Australian Air Force

Link to comment
Share on other sites

As I said I'm happy to help people sort out the prob in their individual file if I've got the same physical gear (fighterstick, pro throttle, pro pedals). I'll look up the other profiles tomorrow as tonight I've had a couple of beers and don't trust myself to not make mistakes.

 

TY scatter. Here is the cmc I'm using---alot is remapped, but I use trim on throttle as is, and trim reset shift+trim as is.

 

http://169thpanthers.com.au/PublicDownloads/BlackShark/Device/CHBS-RC6.rar

 

You say less limitations with seperate devices--could you explain?

 

TY sir


Edited by uhoh7

E8600 Asus P5E Radeon 4870x2 Corsair 4gb Velociraptor 300gb Neopower 650 NZXT Tempest Vista64 Samsung 30" 2560x1600

Link to comment
Share on other sites

TY scatter. Here is the cmc I'm using---alot is remapped, but I use trim on throttle as is, and trim reset shift+trim as is.

 

http://169thpanthers.com.au/PublicDownloads/BlackShark/Device/CHBS-RC6.rar

 

You say less limitations with seperate devices--could you explain?

 

TY sir

 

Thanks for the link. I'll try porting the script to at least a couple of other profiles and write a HOWTO document on how to do it. I'll start with yours.

 

One thing that I can't do is change other author's profiles and repost them though. That would be unfair to the original profile authors.

 

As per the limitation of "bundling" if you bundle everything together into one virtual joystick the number of axes and DX buttons available are often limited (the CH software warns you about this). This may not be a problem but I prefer not to limit my options if the sim supports it.

[sIGPIC][/sIGPIC]

Virtual Australian Air Force

Link to comment
Share on other sites

Uhoh7

here's a script that should plug directly into the profile that you pointed me to (it works on my gear here). It had no pro-rudder assigned to it so I've commented the rudder stuff out. Also, I didn't touch the hat trim as that was shared with something else. As per the comments you'll have to assign the trim on the throttle to DX Device "none". You'll also have to unassign the joystick X and Y axes (set them to DX Device none).

Finally you'll have to assign CMS.A1 to CM Device1 X axis, and CMS.A2 to CM Device1 Y axis.

 

BTW, do you know what software is is to create the bmp with all the assignments? It'd be fantastic if it printed the info directly from a profile.

 

// CMS Script File

//

// Game Title: Black Shark

// Script (only) Written By: ScatterGun http://www.vaaf.net

// Date: 24/12/08

// Warning as with any script this will not just plug into any profile directly

// It has to be customised to fit in with a particular profile

// It works with a trim button that when shifted resets trim

// The trim button cannot have any other "shifted" usage as it will conflict with it

 

script

 

//Change the next 3 entries to your devices

// JS1 is the 1st TAB after "program settings" in the CH manager

// The axis is the greyed out text above the "dx mode" check box

//Write down the DX device that each control is assigned to and change it to "DX Device" none

%DEFINE XIn JS2.A1

%DEFINE YIn JS2.A2

//%DEFINE RIn JS4.A3

 

//Don't change the next few lines

//Instead, go to the CMS tab and assign CMS.A1, CMS.A2, and CMS.A3 to the DX devices that your physical controls were previously mapped to

%DEFINE XOut CMS.A1

%DEFINE YOut CMS.A2

//%DEFINE ROut CMS.A3

 

//Trim and shift buttons - Change to your physical devices

%DEFINE TrimBut JS1.B2

%DEFINE ShiftBut JS1.B3

 

//Internal variables, no need to change these unless you use them in your own scripting

%DEFINE Trimming B1

%DEFINE XTrim A1

%DEFINE YTrim A2

//%DEFINE RTrim A3

 

//Purely hardware trimming for comparison

IF( NOT Trimming ) THEN // If not trimming then

XOut = XIn + XTrim; // add the X offset to the stick X value

YOut = YIn + YTrim; // and add the Y offset to the stick Y value

// ROut = RIn + RTrim;

ENDIF

 

IF (TrimBut AND ShiftBut) THEN //RESET HARDWARE TRIM

XTrim=0;

YTrim=0;

// RTrim=0;

ENDIF

 

SEQUENCE

Trimming = FALSE;

WAIT( TrimBut AND NOT ShiftBut); // Wait until Button 13 pressed

Trimming = TRUE;

XTrim = Xout - 128; // Calculate the X offset and save it in A1

YTrim = Yout - 128; // Calculate the Y offset and save it in A2

// RTrim = Rout - 128;

WAIT( NOT TrimBut );

WHILE( [Xin < 138] AND [Xin > 118]); //Check that all controls are zero'd before applying trim

WHILE( [Yin < 138] AND [Yin > 118]);

// WHILE( [Rin < 138] AND [Rin > 118]);

Trimming = FALSE; // Apply trim

ENDSEQUENCE

 

 

 

endScript


Edited by scatter

[sIGPIC][/sIGPIC]

Virtual Australian Air Force

Link to comment
Share on other sites

Okay, I've now written a wiki page on how to use this script for an alternative way of trimming in Black Shark using CH gear. The wiki shows the steps required to get the script running with a blank map.

 

http://vaaf.net/wiki2/index.php5?title=CH_HOTAS_hardware_trim

 

PS: I've just added a new profile with a more sophisticated set of trimming equations to the wiki. These get around the loss of range that occurs with the simple offset type trimming that I've posted here.


Edited by scatter
added better CH profile to wiki
  • Like 1

[sIGPIC][/sIGPIC]

Virtual Australian Air Force

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...