Cougar HOTAS Speed brake setup
-
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