PDA

View Full Version : How to change Mode button


Ghost Rider
23-02-2004, 06:02 AM
Tomorrow I will probably receive the CH Throttle Pro and I'm going to change my joystick programmation.

Now I use the button 3 as the Mode function. How can I change the button to put the Mode change function to assign it on one of the Throttle button ?

Let's say button 4 on the Throttle I wanted to be the Mode button.

Also I use the throttle wheel on the joystick, now that i'm going to have the throttle what other function I can use with the throttle wheel ?

I'm playing with LOMAC...

Thanks

Bob Church
23-02-2004, 06:40 AM
There's a Mode Switch button on the ProThrottle, you press it by pushing straight down on the mini-stick. That cycles the LEDs on the ProThrottle base like the FighterStick button does the LEDs on it's base. To tell the Map which one to use, look on the Program Settings tab, there's a selection there for ProThrottle.

To set it to any other button, you need to write a little CMS script. There's an example in the Users' Guide, lookfor the CURRENTMODE variable in the CMS Programming section on Predefined Variables and Constants. There's also a sample in the Sample Scripts section (Sample #2) that shows how to do it.

- Bob

The StickWorks
http://www.stickworks.com

LukeFF
30-11-2004, 08:26 PM
Originally posted by Bob Church@Feb 23 2004, 09:40 AM
To set it to any other button, you need to write a little CMS script. There's an example in the Users' Guide, lookfor the CURRENTMODE variable in the CMS Programming section on Predefined Variables and Constants. There's also a sample in the Sample Scripts section (Sample #2) that shows how to do it.

- Bob

The StickWorks
http://www.stickworks.com
<div align="right">1020
[/quote]

I have tried using this Sample #2 script to change the mode switch button on my Fighterstick USB to Button 4, but the change never works. Under the Program Settings tab, I have set mode control to CMS and have followed all the other instructions in the Users Guide "to the book," but obviously I'm still doing something wrong. ;) Could somebody please help me with this?

Bob Church
01-12-2004, 04:17 AM
Well, the sample worked last time I tried it. It's looking for js1.b2. Is your stick on the first tab to the right of the Program Settings tab? If that's the case, you'd need to reference js1.b4 to get Button 4 to do the thing, and you'd need to add the CMS controls to the map, but you must have done that to be able to edit the CMS file. If it's not just button assignments, could you post your script here so I can take a look?

- Bob

The StickWorks
http://www.stickworks.com

LukeFF
01-12-2004, 02:36 PM
Originally posted by Bob Church@Dec 1 2004, 06:17 AM
Well, the sample worked last time I tried it. It's looking for js1.b2. Is your stick on the first tab to the right of the Program Settings tab? If that's the case, you'd need to reference js1.b4 to get Button 4 to do the thing, and you'd need to add the CMS controls to the map, but you must have done that to be able to edit the CMS file. If it's not just button assignments, could you post your script here so I can take a look?

- Bob

The StickWorks
http://www.stickworks.com
<div align="right">8778
[/quote]

Sure, here it is:

script

SEQUENCE
WAIT( JS1.B4 ); // Wait here until JS1.B4 clicks
A1 = A1 + 1; // Add 1 to our Mode counter
IF( [ A1 > 3 ] ) THEN // If the value is over 3 then
A1 = 0; // set it back to 0

ENDIF
CURRENTMODE = A1; // Now copy it to CURRENTMODE
ENDSEQUENCE

endscript

The joystick is the only controller listed in the map, and the Mode Control is set to CMS. Before entering the script in the CM Editor, I clicked on Button 4 on the CMS Controls tab, and then proceeded to enter the script. Once that is done, I went back to the Fighterstick tab and deselected the DirectX box for Button 3 and made sure it was selected for Button 4. At this point I then saved the map and downloaded it to the joystick, at which time it still shows Button 3 as the Mode Switch button.

Bob Church
01-12-2004, 03:00 PM
That all sounds and looks right. How are you determining that the mode isn't changing? The LEDs won't track the mode changes when they're made by the script. That's a hardware function and can't be controlled by the Control Manager. Can is it really changing from mode to mode on button 3 based on what you programmed or just based on the LED state?

- Bob

The StickWorks
http://www.stickworks.com

LukeFF
01-12-2004, 06:47 PM
Originally posted by Bob Church@Dec 1 2004, 05:00 PM
That all sounds and looks right. How are you determining that the mode isn't changing? The LEDs won't track the mode changes when they're made by the script. That's a hardware function and can't be controlled by the Control Manager. Can is it really changing from mode to mode on button 3 based on what you programmed or just based on the LED state?

- Bob

The StickWorks
http://www.stickworks.com
<div align="right">8793
[/quote]

Ah, I didn't realize that about the LEDs. Since that's the case, then I guess there's really no problem then left to solve. Thanks!