View Full Version : Config modes for FS2002
Uneek
02-05-2005, 12:17 PM
At this stage I have prety much sorted out programing my new Fighterstick in the GUI, but have a long way togo
with the CMS and not to mention the CMC. With that said ,I could really use some help configuring modes in FS2002
to get me on my way.
I would like to set it so;
When I cycle through the mods on my fighterstick Js1.b3 different windows open and close.
Mode 1 (green) would be normal flight and programded much the way I have it now.
Mode 2 (red) would open the nav/com window (@) then I could program buttons for this.
Mode 3 (yellow) would open the gps(#) window ......
Dispit the fact that I'm aware of the led's position before down load,everything I have tried dos'nt
cycle properly leaving a window open or won't close it till the next time in that mode.
Does this need to be done in the cms?
I would be greatfull for some surgestions here.
Regards Uneek
Bob Church
02-05-2005, 01:25 PM
Hi Uneek,
You would need to use CMS, but it shouldn't be too difficult. If you add the CMS Controls (there right there where you selected the Stick, etc.) the editor will be available. Look at the CURRENTMODE function. It's back in the CMS Programmers Guide in the section on section on Predefined Variables and Constants. For a 3-mode map as you're proposing, it will have the values 0, 1, or 2 depending on which mode it's in. The script would need to watch those and then generate a CMS buttons that controlled the Windows. I'm not sure what you need to do to open an close the Windows though. Are the toggles (same key, first time open and the second time close) or are there separate keys for the open and close operations? If you let me know, I can show you how to set the script up. Also, you don't need to use the predefined button if you'd rather use another one. It's just that the LEDs won't indicate where you are, but if you've got Windows opening I don't thing that it would matter much.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
Uneek
02-05-2005, 07:33 PM
Originally posted by Bob Church@May 2 2005, 11:25 PM
Hi Uneek,
You would need to use CMS, but it shouldn't be too difficult. If you add the CMS Controls (there right there where you selected the Stick, etc.) the editor will be available. Look at the CURRENTMODE function. It's back in the CMS Programmers Guide in the section on section on Predefined Variables and Constants. For a 3-mode map as you're proposing, it will have the values 0, 1, or 2 depending on which mode it's in. The script would need to watch those and then generate a CMS buttons that controlled the Windows. I'm not sure what you need to do to open an close the Windows though. Are the toggles (same key, first time open and the second time close) or are there separateÂ* keys for the open and close operations? If you let me know, I can show you how to set the script up. Also, you don't need to use the predefined button if you'd rather use another one. It's just that the LEDs won't indicate where you are, but if you've got Windows opening I don't thing that it would matter much.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
<div align="right">12397
[/quote]
Hi Bob,
Thanks for getting back to me .
Fisrtly as to do the windows toggle with the same command. is yes
mode2 Nav/com is (@)
mode3 GPS is (#)
Howerver in the next paragraph to the CURRENTMODE constant is the FTRSTKMODE which mentions similar values depnding on the Led last on.
If you could guide me down this road would be great, as there are'nt any
examples in the CMS guide for it.
As to your mention of the window being the mode state,You are obvious with me
Thanks again
Josh
Bob Church
02-05-2005, 09:20 PM
Hi Josh,
>> Thanks for getting back to me . <<
You're quite welcome!
>> Fisrtly as to do the windows toggle with the same command. is yes
mode2 Nav/com is (@)
mode3 GPS is (#) <<
Okay. I thought that was the case but I couldn't recall offhand how they worked.
>> Howerver in the next paragraph to the CURRENTMODE constant is the FTRSTKMODE which mentions similar values depnding on the Led last on. If you could guide me down this road would be great, as there are'nt any examples in the CMS guide for it. <<
The main difference is that FTRSTKMODE tells you which mode the FighterStick itself is in, basically just which of the LEDs is on. CURRENTMODE tells you which mode the Control Manager is in. If the FighterStick is designated as the Mode Control on the Program Settings page like you're talking about doing, then the two are the same. If you were using a Pro Throttle or CMS programming to control the Mode, CURRENTMODE and FTRSTKMODE wouldn't necessarily match. Also, you can set CURRENTMODE with a CMS script and the Control Manager will change modes, but FTRSTKMODE and PROTHRMODE are Read-Only. Anyway, since you're using the FighterStick normally, it doesn't really matter which one you use.
The problem with the toggle is that you need to hit it twice, once when you enter the mode and then once again when you leave, and there is the chance that it will get out of sync, you might hit the key on the keyboard by mistake and open the Window in another mode. If it happens just hit the key again to get it back to where it should be.
Anyway, basically what you need to do is to first add the CMS Controls to your map. Once you've done that, you can open the CMS editor and write a small script:
script
cms.b1 = [ CURRENTMODE == MODE2 ];
cms.b2 = [ CURRENTMODE == MODE3 ];
endScript
Save the script and go close the editor. Next, select the CMS Controls tab and select Button 1. Make sure you've got the "Mode 1" tab selected. Uncheck the "DX Mode" box, then in the "Normal Action" section set the "Press" box to send:
@ NULL
and set the "Release" box to send:
@
Next do the same for Button 2 but set the "Press" box ot send
# NULL
and the "Release" just to send:
#
That will cause it to send one "@" or "#" when it enters the Mode to open the window, then another "@" or "#" when it leaves the mode to close the Window. You only need to program it on the Mode 1 Tab. When the other tabs are left blank, they'll use the Mode 1 programming, too.
That's about all there is to it. You might have to cycle through the modes once at the beginning of a flight to get them synchronized, but that's about the only problem I can see.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
Uneek
03-05-2005, 07:32 AM
Originally posted by Bob Church@May 3 2005, 07:20 AM
Hi Josh,
>> Thanks for getting back to me . <<
You're quite welcome!
>> Fisrtly as to do the windows toggle with the same command. is yes
mode2 Nav/com is (@)
mode3 GPS is (#) <<
Okay. I thought that was the case but I couldn't recall offhand how they worked.
>> Howerver in the next paragraph to the CURRENTMODE constant is the FTRSTKMODE which mentions similar values depnding on the Led last on. If you could guide me down this road would be great, as there are'nt any examples in the CMS guide for it. <<
The main difference is that FTRSTKMODE tells you which mode the FighterStick itself is in, basically just which of the LEDs is on. CURRENTMODE tells you which mode the Control Manager is in. If the FighterStick is designated as the Mode Control on the Program Settings page like you're talking about doing, then the two are the same. If you were using a Pro Throttle or CMS programming to control the Mode, CURRENTMODE and FTRSTKMODE wouldn't necessarily match. Also, you can set CURRENTMODE with a CMS script and the Control Manager will change modes, but FTRSTKMODE and PROTHRMODE are Read-Only. Anyway, since you're using the FighterStick normally, it doesn't really matter which one you use.
The problem with the toggle is that you need to hit it twice, once when you enter the mode and then once again when you leave, and there is the chance that it will get out of sync, you might hit the key on the keyboard by mistake and open the Window in another mode. If it happens just hit the key again to get it back to where it should be.
Anyway, basically what you need to do is to first add the CMS Controls to your map. Once you've done that, you can open the CMS editor and write a small script:
script
cms.b1 = [ CURRENTMODE == MODE2 ];
cms.b2 = [ CURRENTMODE == MODE3 ];
endScript
Save the script and go close the editor. Next, select the CMS Controls tab and select Button 1. Make sure you've got the "Mode 1" tab selected. Uncheck the "DX Mode" box, then in the "Normal Action" section set the "Press" box to send:
@ NULL
and set the "Release" box to send:
@
Next do the same for Button 2 but set the "Press" box ot send
# NULL
and the "Release" just to send:
#
That will cause it to send one "@" or "#" when it enters the Mode to open the window, then another "@" or "#" when it leaves the mode to close the Window. You only need to program it on the Mode 1 Tab. When the other tabs are left blank, they'll use the Mode 1 programming, too.
That's about all there is to it. You might have to cycle through the modes once at the beginning of a flight to get them synchronized, but that's about the only problem I can see.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
<div align="right">12399
[/quote]
Hello again Bob,
I have done as U instrucred to a T, no problem there,and checked
it twice. However in the sim I get no responce.
To clear a few things up through, do I have to select CMS mode
control in the PROGRAM TAB or leave it to the stick? And how come there is no
reference made to a stick button in the script? EG. js1.b3
Could U also explain the use of the square brakets in the script and parenthicis in general. I have managed to asign a cms.bx to a js1.bx for no good use mind U, but dont asume I know anything. If you do make reference to the users guide I have probebly read it and be able to recall it.
Cheers and thanks again
Regards Josh
Bob Church
03-05-2005, 08:27 AM
Hello Uneek,
>> I have done as U instrucred to a T, no problem there,and checked it twice. However in the sim I get no responce. <<
Start NotePad with the map active and run through the modes. See if it sends the characters. You should see an "@" on the Mode 1 -> Mode 2 change, then a "@#" on the Mode 3 -> Mode 3 change, and finally a "#" on the Mode 3 -> Mode 1 change. If you see that then the program is working. Are you using a non-US keyboard? If you are, try using "2" rather than "@" and "3" rather than "#" in both the Press and Release sides.
>> To clear a few things up through, do I have to select CMS mode control in the PROGRAM TAB or leave it to the stick? <<
Leave it set to the stick. You would only change that if unless you wanted to use some other button.
>> Could U also explain the use of the square brakets in the script... <<
The square brackets are just to indicate that it's a comparison and has a TRUE/FALSE value. The compiler doesn't understand "cms.b1 = CURRENTMODE == MODE2", putting the "[" and "]" around the comparison tells it that the result of the comparison should be treated as a bit value.
>> ...and parenthicis in general. I have managed to asign a cms.bx to a js1.bx for no good use mind U, but dont asume I know anything. If you do make reference to the users guide I have probebly read it and be able to recall it. <<
"(" and ")" pretty much just serve the normal purpose of grouping operations or enclosing parameters for functions. They're generally just used to control the ordering of arithmetic operations.
Anyway, check the keys and try the swap if need be. See if it will fix it up for you.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
Uneek
03-05-2005, 12:05 PM
Love your work Bob that was just wht I needed.
Josh
Bob Church
03-05-2005, 09:51 PM
Hi Josh,
>> Love your work Bob that was just wht I needed. <<
I'm glad it was some help, Josh! Have fun with it!
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.