Author Topic: Cougar Programming  (Read 439 times)

Offline Modas

  • Silver Member
  • ****
  • Posts: 922
      • http://www.cutthroats.com
Cougar Programming
« on: June 25, 2002, 03:58:57 PM »
-

Does anyone know how to program the microstick axis (i.e. the mouse thingy ) to generate keypresses rather then acting like a mouse to drive a cursor?  I'm having a heck of a time figgering this one out.  Thanks in advance!

Offline FOGOLD

  • Silver Member
  • ****
  • Posts: 1886
Cougar Programming
« Reply #1 on: June 25, 2002, 04:51:33 PM »
I am having a heck of a time figuring this whole stick out. I try things and when I go to AH the whole stick stops working, pc won't reboot, stick has to be unplugged etc!

I will PAY some sucker to programme this stick for AH as I want it to be, cos I have neither the time nor the inclination to f**k about with it any more:mad:

The problem is that this is NOT playing Aces High!

Offline Modas

  • Silver Member
  • ****
  • Posts: 922
      • http://www.cutthroats.com
Cougar Programming
« Reply #2 on: June 25, 2002, 05:01:56 PM »
check that the button emulation in the CCP is turned on (i.e. green) if you are programming and not using DX buttons.  Every time mine takes a sh*t in AH, for whatever reason, this button has reverted to an "off".  I trip that back to "On" and go back into AH and all is ok again.

Offline FOGOLD

  • Silver Member
  • ****
  • Posts: 1886
Cougar Programming
« Reply #3 on: June 25, 2002, 05:13:20 PM »
I find if it stops working in AH, the CCP won't open and the PC won't restart the normal way. I have to cold boot and unplug and replug the stick.  I know I'm programming it wrong somehow, but the stick accepts my files ok.

What I want to do is basically keep the stick mapping I've set up in AH and add a few more keyboard strokes and functions to the rotary axes. I suspect that the thing can't do this as there are programmed/DirectX conflicts. Why the hell can't Cougar be as easy to set up as the Aces High stick mapping? It really is a tool for nerds!

Offline LoneStarBuckeye

  • Copper Member
  • **
  • Posts: 336
      • http://None
Cougar Programming
« Reply #4 on: June 25, 2002, 05:51:39 PM »
To assign key presses to the microstick, just use an axis statement (there are, I believe six different types that are appropriate and convenient in different circumstances) like you would for any of the other analog axes.  Also, make sure you have not included one of Foxy's "use microstick as mouse" type statements.

For example, if you want the microstick X axis to send an A when between 0 and 20% deflected (almost fuly left), a B when between 20% and 40% deflected (left of center), nothing when centered (this is what the "^" represents), a C when between 60% and 80% deflected (right of center), and a D when between 80% and 100% deflected (almost fully right), you could use the following Type 5 axis statement:

MIX 5 5 (0 20 40 60 80 100) A B ^ C D

If you want the microstick Y axis to send F when deflected down and G when deflect up, but nothing when centered, you might use the following Type 1 axis statement:

MIY 1 3 F G ^

There are myriad other possiblities, but that's part of the fun :)  I hope that helps.  If not, let me know and I will try to be more specific.

- JNOV

Offline Modas

  • Silver Member
  • ****
  • Posts: 922
      • http://www.cutthroats.com
Cougar Programming
« Reply #5 on: June 25, 2002, 06:03:14 PM »
sweet.  Thx for the reply, I'll try that out tonight, if, COD forbid, I could get outta work :D  (which is where I am now, working hard)  hehehheeh

Offline GunnerCAF

  • Silver Member
  • ****
  • Posts: 946
      • Gunner's Grange
FOGOLD
« Reply #6 on: June 26, 2002, 12:11:09 AM »
Quote
What I want to do is basically keep the stick mapping I've set up in AH and add a few more keyboard strokes and functions to the rotary axes.


If you just using the Cougar in Windows mode, and mapping buttons in AH.  You could try this, and run in Program mode.  Use Foxy to make a program with the following statements:


USE ALL_DIRECTX_BUTTONS

Rem Range Knob - Map Zoom
RNG 3 INS ^ DEL  

Rem Antenna Knob - RPM
ANT 3 KP+ ^ KP-


Save, compile it and load it in your stick.  Put the stick in program mode and go fly.

The example above uses all buttons in DX mode, like if it were in Windows mode, and sends a keyboard charactors when you move the range and antenna knobs.  This example zooms the map with the range knob, and up/dn RPM with the anntenna knob.  You can replace the keyboard charactors with anything you want.

Just a note, Rem are remark statements and are ignored so they are not needed for this to work.

I have attached the file so you don't have to retype it in, or if this is all you want, just tell me what you want the knobs to do and I will make you one... for free ;)

Gunner
« Last Edit: June 26, 2002, 12:20:15 AM by GunnerCAF »
Gunner
Cactus Air Force

Offline GunnerCAF

  • Silver Member
  • ****
  • Posts: 946
      • Gunner's Grange
Attachment
« Reply #7 on: June 26, 2002, 12:15:53 AM »
Here is the attachment, I had to zip it to attach it here:
Gunner
Cactus Air Force

Offline FOGOLD

  • Silver Member
  • ****
  • Posts: 1886
Cougar Programming
« Reply #8 on: June 26, 2002, 01:50:30 AM »
Thanks Gunner:D

I get the set all DirectX Buttons bit.

What about axes. I want to set axis response in AH but also set RNG and ANT for other things like (like you,ve written) Is there a conflict there?

What I want is : programme all the main buttons in AH (this gives me most flying commands)

                       Set all axis responses in AH


Use Foxy to gain keyboard presses such as Shft Fuel toggling, Record, text buffer size,  etc. (I think you use S3 to do this) and most of the other keyboard strokes.

Ideally ANT for map zoom (I tried this on its own but it crashed the stick. I hadn't set all buttons DX though)

Will AH take axis commands from the stick whether it's in programmed mode or not. The stick axis programming is completely seperate from the Foxy programmes right?

I need to do all this in work time. My wife says "I'm sick of you dissapearing to that PC all the time" lol



:o

Offline FOGOLD

  • Silver Member
  • ****
  • Posts: 1886
Cougar Programming
« Reply #9 on: June 26, 2002, 02:22:02 AM »
I tried this

USE MDEF Aces High.tmm

USE ALL_DIRECTX_BUTTONS

Rem Ant Knob- Map Zoom
ANT 3 INS ^ DEL

and it crashed the stick forcing me to reboot.

Offline FOGOLD

  • Silver Member
  • ****
  • Posts: 1886
Cougar Programming
« Reply #10 on: June 26, 2002, 09:22:22 AM »
Guys, guys I cracked it:D  I was getting my macro's wrong somehow.

Thanks for all your help and putting up with my teeth gnashing. I still feel a bit frustrated spending so much time on this stick instead of playing the game.

Best things about the stick are loads of buttons and the stiff springs which I love.

Offline FOGOLD

  • Silver Member
  • ****
  • Posts: 1886
Cougar Programming
« Reply #11 on: June 26, 2002, 09:56:50 AM »
WIERD

If I leave the stick in programmed mode, the buttons and rotaries still work in other programmes, not just AH!

I just brought up a "delete" dialogue box on my desktop by turning the ANT normally used for map zoom (del). Is this normal?
Is it cos I've set all buttons as DirectX?

It doesn't happen if Button and Axis Emulation is Off

Offline Wanker

  • Platinum Member
  • ******
  • Posts: 4030
Cougar Programming
« Reply #12 on: June 26, 2002, 10:49:09 AM »
It's completely normal, FOGOLD, because the programmed Cougar is just like typing on the keyboard. I created one profile for my Cougar, and am adjusting all my flight sims to conform to that profile, rather than have to create a separate profile for each game.

Offline GunnerCAF

  • Silver Member
  • ****
  • Posts: 946
      • Gunner's Grange
Cougar Programming
« Reply #13 on: June 26, 2002, 04:36:29 PM »
FOGOLD

Quote
What about axes. I want to set axis response in AH but also set RNG and ANT for other things like (like you,ve written) Is there a conflict there?


There is no conflict.  You could use both if you like.

Quote
Will AH take axis commands from the stick whether it's in programmed mode or not. The stick axis programming is completely seperate from the Foxy programmes right?


You can make axis profiles using the CCP. You can use Foxy to make a program the uses a saved axis profile.  You can also set up a button to change your axis profile in your program.  As an example, if the Dog Fight switch is up, make an axis more sensitive, and when down, less sensitive.  But now we are getting kind of deep :) If you want to keep it simple, use the default axis profile (straight line), and use AH to adjust it the way you want.


Quote
If I leave the stick in programmed mode, the buttons and rotaries still work in other programmes, not just AH!

I just brought up a "delete" dialogue box on my desktop by turning the ANT normally used for map zoom (del). Is this normal?
Is it cos I've set all buttons as DirectX?

It doesn't happen if Button and Axis Emulation is Off




I should have warned you about this, the Cougar dosen't know if the game is playing or not, so it could send ins or del key presses like your holding down a key.   You should put it back in Windows mode (emulation off) when your not in the game.  There are other things you can do.  Like programming it to hold a DX button down and mapping this button to map zoom in AH.  I don't think this will work for you because your are most likely using all your DX buttons.  Or you can Keymap AH to use keys other than your INS DEL keys, then change the program to match.

Quote
Thanks for all your help and putting up with my teeth gnashing. I still feel a bit frustrated spending so much time on this stick instead of playing the game.


LOL, NP... just keep telling yourself... this is as fun as flying.  I think the time setting up the Cougar the way you want is well worth it in the long run.  I had my FLCS for 6 years, so the time I spent on programming is very small over the time I spent using it.

Gunner
Gunner
Cactus Air Force

Offline Shiva

  • Silver Member
  • ****
  • Posts: 966
      • http://members.cox.net/srmalloy/
Cougar Programming
« Reply #14 on: July 09, 2002, 02:06:53 PM »
Quote
Does anyone know how to program the microstick axis (i.e. the mouse thingy ) to generate keypresses rather then acting like a mouse to drive a cursor? I'm having a heck of a time figgering this one out. Thanks in advance!


You should look at the Cougar programming forums at Cougar World, particularly DonULFonso's posts in the Logical Programming forum. The thread MICROSTICK: DIGITAL 8 + 8 - way operation  shows a very detailed reprogramming of the microstick to produce digital output.

My own setup for AH isn't anywhere near as complicated. I have two sets of view functions programmed into my Cougar. Hat 3 functions for snap views -- level with forward/up, raised 45° if I hold in S3 (H3U becoming straight up), 45° down if I hold in S4. The microstick functions for pan views -- hold in T1 and the microstick pans the view. The program for this is:

Rem ------------------------------------------
Rem           Hat 3: Views. S3 adds up, S4 adds down
Rem ------------------------------------------
Rem ............-45° (control panel view)
Rem ............+90°
Rem ............+45°
Rem ....+45°...(FWD)...+45°
Rem ....LftFwd...|...RgtFwd
Rem ....-45°..\..|../..-45°
Rem +45°.......\.|./........+45° -> +S3 = +45°
Rem LFT --------H+1-------- RGT
Rem -45°......./.|.\........-45° -> +S4 = -45°
Rem ....+45°../..|..\..+45°
Rem ....LftBwd...|...RgtBwd
Rem ....-45°...(Fwd)...-45°
Rem ............+45°
Rem ............-45°

DEF X1 (H3U AND NOT S3)
DEF X2 (S4 AND (NOT S3) AND (H3U OR H3UR OR H3R OR H3DR OR H3D OR H3DL OR H3L OR H3UL))
DEF X3 (S3 AND (H3U OR H3UR OR H3R OR H3DR OR H3D OR H3DL OR H3L OR H3UL)) OR (H3U AND (NOT (H3UL OR H3UR)))
DEF X4 (H3U OR H3UR OR H3R OR H3DR OR H3D OR H3DL OR H3L OR H3UL)

BTN X4   F1
BTN X1   /H KP8 REM Fwd
BTN H3UR /H KP9 REM Fwd_Rgt
BTN H3R  /H KP6 REM Rgt
BTN H3DR /H KP3 REM Bwd_Rgt
BTN H3D  /H KP2 REM Back
BTN H3DL /H KP1 REM Bwd_Lft
BTN H3L  /H KP4 REM Lft
BTN H3UL /H KP7 REM Fwd_Lft
BTN X2   /H KP0 REM Down
BTN X3   /H KP5 REM Up

Rem ------------------------------------
Rem           Throttle Controls
Rem ------------------------------------
MIX 5 3 (0 25 75 100) X5 ^ X6
MIY 5 3 (0 25 75 100) X7 ^ X8
BTN T1 F8
DEF X9  (X5 AND T1)
DEF X10 (X6 AND T1)
DEF X11 (X7 AND T1)
DEF X12 (X8 AND T1)
BTN X9  /H KP2
BTN X10 /H KP8
BTN X11 /H KP6
BTN X12 /H KP4


I redefine the microstick axes with Type 5 commands to set logical flags in the outer 25% of travel so that it's easier to be stable while panning the view, then use those flags to set another set of flags only if I'm holding T1 (the microstick switch) in at the same time, and those flags control the view keys. Pressing T1, however, switches from snap to pan, so that any microstick movement with the microstick button pressed pans the view. The flag X4, which is set if H3 is moved off center, switches back to snap view, so I can switch between pan and snap views just by which view control I'm using.