Cougar HOTAS Speed brake setup
-
Hi all!
I am getting into setting up my Cougar, and I am plowing my way through the documentation from Thrustmaster. I have run into a problem, however.Currently I use T9 = SHF b (open incrementally) and T10 = b (speed brake toggle) - for most parts that’s all well and good, as the toggle goes towards closed if the sb is any amount of open. However, if the brake is closed, b opens the brake instead - which has gotten me killed more than once, due to poor energy management, switchology, confusion in combat, etc.
Now I have been looking at using toggles (/T), but that’s no good. I know what is needed, but not how to implement it in foxy, or even if it can be done.
The solution involves the use of flags, or at least that seems to be the way to do it for me. The logic is as follows:
one flag X1, is set high, when ever T9 is activated, and set low, whenever T10 is activated.
the rest consists of a branched execution on T10:
If X1 is high (the brake must thus be at least partially open): close the speed brake, and set X1 low
If X1 is low (the brake must now already be closed): Do nothing at allBut how do you do this? use of nested flags?
Any help would be greatly appreciated
/RAMP
-
I’d say set it up like the real one, use the back position to open it as you need them opened, and move it to the front one once you want it closed. Which means back=open, forward=close.
-
You want press-and-hold semantics for the button presses for T9 and T10. And you want to use the callback that closes the boards for the forward position. Don’t use the toggle callback if you want realistic behavior.
-
for the .tmj
Rem X32 prevents the Airbrakes_Close to be active for more than 3.5 sec. This time is long Rem enough for the airbrakes to retract and then stops sending out an Airbrakes_Close Rem command if you forget the T10 button activated. Rem If you are using the alternative airbrake functionality Rem mark the two lines below. DEF X32 DELAY(6000) T10 AND (NOT S3) BTN X32 <airbrakes_close_release></airbrakes_close_release>
and…
Rem ------------------------------------------------- Rem Speedbrake (T9, T10) Rem ------------------------------------------------- Rem The airbrakes are commanded out as long as T9 is active and holds the current Rem airbrakes position when T9 is released. Rem The airbrakes are commanded in as long as T10 is active and holds the current Rem airbrake position when T10 is released. BTN T9 /I ^ /O /P <airbrakes_open_press> /R <airbrakes_open_release> Rem /O /H <airbrakes_open> BTN T10 /P <airbrakes_close_press> Rem see also state X32 /R <airbrakes_close_release> Rem see also state X32 Rem Below is an alternative airbrake functionality Rem Open airbrakes when T9 is pressed and close airbrakes when T9 is released Rem Open airbrakes when T10 is active and close airbrakes when T10 is released Rem If you want to use the functionality below don't forget to Rem mark the two lines Rem that begins with DEF X32 ..... and BTN X32 ..... Rem BTN T9 /I ^ Rem /O /P /H <airbrakes_open> Rem /R Airbrakes_Toggle Rem BTN T10 /P Airbrakes_Toggle Rem /R Airbrakes_Toggle</airbrakes_open></airbrakes_close_release></airbrakes_close_press></airbrakes_open></airbrakes_open_release></airbrakes_open_press>
in the .tmm
Rem ------------------------------------------------------------------------ Rem FLIGHT CONTROLS Rem ------------------------------------------------------------------------ Airbrakes_Open = SHF b Airbrakes_Open_Press = KD(SHF b) Airbrakes_Open_Release = KU(b SHF) Airbrakes_Close = CTL b Airbrakes_Close_Press = KD(CTL b) Airbrakes_Close_Release = KU(b CTL) Airbrakes_Toggle = b
the delay on the beginning is to give time to the command to fully close the brakes.
hope it helps… -
So some there are some nuances to this…
First a “typo” in the above – the comment says 3.5 secs but the “code” more correctly uses 6000 millisecs for the delay which is about the right length of time to allow the boards to come all the way in with the realistic rate that is now. I mention this just for clarification since it’s not material to operation of the above programming that the comment is out of date.
Second, there’s a better and simpler way to do this. If you assign T9 and T10 to send DX button presses not key presses (especially not moded [SHF/CTL/ALT] key sequences) then there is no need to turn off the T10 macro in the case that you park the switch in the T10 position and forget (or decline) to center it. If you bind the DX button for T10 to the close boards callback (which you would do in the .key file), T10 can remain pressed (i.e. off center position) indefinitely and you will get the effect you want without detrimental impact on operation or interactions with other key-based bindings.
-
…and you gents should try to use the new “pure DirectX input” functionality to avoid all that keyboard input mess.
Check out the profile in <bms>\User\Joystick\cougar\Dunc_DX for details, I did put comments in every that should help you understanding how the new system works.
And no, I do NOT say this only because I want to advertise “my” profile, it really helps to avoid keyboard issues ;)</bms>
-
Kewl!
Great input, everyone! - and blisteringly fast, too
Arty: thanks for the code examples, I’ll try these out, for sure!
Boxer: I’m a bit fuzzy on the concept of callbacks, and the specific one you mention?/RAMP
-
…and you gents should try to use the new “pure DirectX input” functionality to avoid all that keyboard input mess.
Check out the profile in <bms>\User\Joystick\cougar\Dunc_DX for details, I did put comments in every that should help you understanding how the new system works.
And no, I do NOT say this only because I want to advertise “my” profile, it really helps to avoid keyboard issues ;)</bms>
I didn’t know there were profiles included - I’ll have a gander there, too - thanks!
/RAMP
-
…and you gents should try to use the new “pure DirectX input” functionality to avoid all that keyboard input mess.
Check out the profile in <bms>\User\Joystick\cougar\Dunc_DX for details, I did put comments in every that should help you understanding how the new system works.
And no, I do NOT say this only because I want to advertise “my” profile, it really helps to avoid keyboard issues ;)</bms>
Done it but the result was a disaster…
Prolly my mistake… -
-
-
Moved to the appropriate forum