Jump to content

COUGAR programming


Recommended Posts

Hello, everybody!

I'm a proud owner of a TM HOTAS Cougar. It worked as expected from the first second I plugged it in. It is the best FCS not made for home made cockpits (because the Warthoug seems that way).

It's biggest reported problem is the programming. I haven't own any Thrustmaster joystick or FCS prior to the Cougar, and I am again proud to say that I program my Cougar alone, after just reading the reference book they provided (and I'm not talking about BTN S1 NWS statements, check this out:

DEF X1 DELAY(1000) S1 AND NOT S3

BTN X1 FCC_mode

BTN S1 /U /I AA_cycle

/O NWS

/M /I AG_cycle

/O NWS

/D /I AA_cycle

/O NWS

;)). I know I'm not the best, but I get around.

Now, enough bragging...do any of you know a method to program a button to do a function when pressed (tapped) and another function when held, BUT when you press the button for the hold function, the tap function won't get triggered? So pressing a button and keeping it pressed more than a certain amount of time triggers the second function, but not the first one. You Cougar programmers can think of it like this:

DEF X1 S1 DELAY(60) NOT S1

BTN X1 tap_func

DEF X2 DELAY(1000) S1

BTN S1 hold_func

The problem with the above "code" is 1) I don't think logical statements are alowed near the DELAY() function and 2) I haven't tested this (just thought of it to ease the uderstanding and I'm not at my flying computer to test it).

That's all! Programming the Cougar is the cherry on top of a perfect FCS. Read the manuals!

P.S. Do you know of any good and still functioning Cougar programming site/forum?

Adrian

Link to comment
Share on other sites

Adrian,

Welcome to the forum. Most of the time with what you describe, I create the delay statement with a macro that does what I want and reverses the previous keypress (e.g. if the keypress is a toggle, then I add the toggle to the delay statement to reset its status). The following routine might help some if you need a more robust routine, but it eats up its share of logic flags.

Here is an excerpt I use with my Total Air War profile that creates a "smart" autopilot toggle, where the in-game autopilot is strictly a toggle of the keypress "a". This determines whether a key/macro is pressed based on an existing logic state and the length of time the button is held.

X8 determines whether Autopilot state is engaged by button

Autopilot works as follows:

  • Rem While not in AA/AG mode (i.e. T7/T8 off), holding down S2 for 300ms engages autopilot if AP is off. if AP is on, holding the button has no effect.
  • If AP is on, tapping S2 disengages AP. If AP is off, tapping S2 has no effect.
  • If in AA/AG Mode, tapping S2+S3 disengages AP flag (X8), but toggles autopilot. Good if you want to quickly disengage autopilot (i.e. if you get bounced or shot at). I did have a smart routine, but I changed it to a toggle to free up a logic flag for other operations.

Also, the X19 on the T1 line is a global S3 logic state allowing for a double click. Don't worry that you don't see X19 anywhere else in the routine.


Rem Autopilot Toggle (with removing Flag) added for S3+S2 in AA/AG for toggle AP w/o cycling weps

Rem X21 (Disable AP in AA/AG) remmed out because toggle is now with S3+S2 in AA/AG.  X21 now set for Manual Emcon 5


DEF X20 DELAY(300) (NOT S3 AND S2 AND NOT X8) 

DEF X22 NOT S3 AND S2 AND X8 AND NOT T7 AND NOT T8

DEF X23 DELAY(300) NOT S3 AND S2 AND NOT T7 AND NOT T8 AND X8


BTN X20 /P AutoPilot /R KD(X8) kd(X29) DLY(20) KU(X29) REM rel of Delay AP on X8 On

BTN X22 /P ^ /R KU(X8) KD(X28) DLY(15) KU(X28) REM rel of S2 (quick)

BTN X23 /P ^ /R KD (X29) DLY(20) KU(X29) KD(X8) REM rel of S2 (AP/X8 already engaged)


DEF X27 DELAY (10) x28 and (not x29) AND NOT T7 AND NOT T8

BTN X27 Autopilot KU(X8) REM Releases autopilot on tap of S2 in nav mode



Rem The following logic codes allow for enabling time accelerate and time skip provided the following conditions are met:

Rem 		1) Autopilot Flag is on

Rem		2) T7 and T8 are off (e.g. NAV mode)

Rem Hold down T1 for 1/2 second for Time Accel

Rem Hold down T1 and S3 for 1/2 second for Time Skip

DEF X30 DELAY(500) NOT S3 AND T1 AND NOT T7 AND NOT T8 AND X8

DEF X31 DELAY(500) S3 AND T1 AND NOT T7 AND NOT T8 AND X8


btn X30 Time_accelerate

btn X31 Time_skip


DEF X32 T1 AND S3 AND X33

BTN X32 KU(X8) KU(X44) rem allows flags reset doubletap following time skip


Rem ################################################

Rem                      	Throttle buttons

Rem ################################################


rem T1 acts as left mouse button.  Logic flags on /I are for previous logic routines

BTN T1 /I /P KU(X19) /R KD(X33) DLY(60) KU(X33)

   	/O /H MOUSE_LB 


I also recommend looking at Jagstang's Falcon 4.0 profiles. This guy knows every trick in the Cougar book, and he uses them in his profiles. Analyzing these profiles is how I learned how to program the Cougar.

HTH.

Link to comment
Share on other sites

  • 3 months later...
 Share

×
×
  • Create New...