Author Topic: Cougar HOTAS - help required  (Read 309 times)

Offline Replicant

  • Gold Member
  • *****
  • Posts: 3567
Cougar HOTAS - help required
« on: May 26, 2003, 06:58:20 PM »
Hi

I've misplaced my Cougar manual and need a bit of help.

I have the "Rdr Cursor/Enable" microswitch T1 setup as a mouse.  I want to change this to a 4 HAT switch but also keeping the button.

What do I need to program to do that?  

Can I simply use T1U, T1D, T1L and T1R for a 4 way HAT?  

What about the button, which I want to set the keypresses F1 delay F8 programmed to it.

Many thanks
NEXX

Offline DonULFonso

  • Zinc Member
  • *
  • Posts: 98
      • http://www.Thrustmaster-X-Files.de
digital/analog
« Reply #1 on: May 27, 2003, 02:08:16 PM »
1st off, the MICROSWITCH is the microswitch ;) ,
and depressing it is BuTtoN T1.

Since the MICROSWITCH is an analog device with 2 analog axes -
not a digital coolie-HAT with 9 programmable positions (8-way + middle/center)
which are adressed via the standard BuTtoN-statements -
its axes can be split into up to 50 regions/bands(/positions) each
via any of the available 6 "digital axis"-statements
(actually, it's 4 main-types plus 2 variations).

If I got you right you'd like to use your MICROSWITCH as a 4-WAY HAT, right?
OK, you basically have 2 choices:
either 4-WAY with corners,
meaning that the corners generate the combined output of both neighboured main directions,
or pure 4-WAY without corners,
meaning that only the main directions will generate their assigned output
while the corners won't generate anything at all.

Now, the best "digital axis"-statement for this case is a "type 5",
which is an enhanced version of the original "type 2":
the "type 5" allows to specify the exact size of each region/band.

OK, you'll need (at least ;) ) 3 regions/bands for each axis
to separate out left/center/right respectively down/center/up;
the size of the outer (= off-center) regions/bands
depends on whether you want the "corners" to generate output or not.

Let's start with 4-WAY without corners:

MIY 5 3 (0 15        85 100) (/H macro_down) ^ [b]([/b]/H macro_up   [b])[/b]
MIX 5 3 (0 15        85 100) (/H macro_left) ^ (/H macro_right)

Now 4-WAY with corners:
simply increase the size of the outer regions/bands :D :

MIY 5 3 (0   30    70   100) (/H macro_down) ^ (/H macro_up   )
MIX 5 3 (0   30    70   100) (/H macro_left) ^ (/H macro_right)

Note that the values I've chosen are just examples which you can try -
if you don't like them, feel free to adjust them to match your own taste.

BTW, for these examples I've chosen "/H"eld macros
because if you do, you must use brackets like I did,
else the compiler will interpret "/H" and "macro_whatever" as 2 separate statements
and you'll get an error-message saying you've specified a wrong no. of bands/macros
(the compiler happens to be not that smart from time to time).

If you use the default "/N"on-repeating (old syntax) output,
then you don't have to use brackets, of course.

Note that the "/A"uto-repeating slash-modifier isn't allowed in "digital axis"-statements directly -
in case you should need this type of output, use "/H"eld logical flags instead
and then specify the desired "/A"uto-repeat code to this flag's BuTtoN-statement -
this way you'll indirectly get the desired result ;) :

MIY 5 3 (0 15        85 100) (/H X2) ^ ([b]/H X1[/b])
MIX 5 3 (0 15        85 100) (/H X3) ^ (/H X4)

BTN [b]X1 /A[/b] macro_up    DLY(120)
BTN X2 /A macro_down  DLY(120)
BTN X3 /A macro_left  DLY(120)
BTN X4 /A macro_right DLY(120)

That's it, more or less :) -
as long as you don't need true 8-WAY operation for the MICROSTICK's axes
(always remember this: it's 1 device, sure, but consists of 2 analog axes!),
for then you'd need some logical programming to sort out these 8 directions...

Hope this helps.

As for your T1, that's easy ;) since it's simply a common BTN-statement
plus a standard syntax' DeLaY between both parts that are to be generated;
the delay's duration is specified in milli-seconds:

BTN T1 macro_1 DLY(990) macro_2

would generate a single non-repeated "macro_1", then "pause" for about a second
(keep in mind that one "frame" is around 30ms, hence I used "990" instead of "1000" -
just to include this info, for you wouldn't notice the difference anyway ;) )
before generating "macro_2", again not repeated but only once.

Note that it doesn't matter how long you hold T1 depressed:
the standard syntax' DeLaY always gets generated completely,
no matter whether you just quickly "tap" T1 or hold it for a longer time!

If you should want to make "macro_2" dependant on the time you depress T1,
then you'd need the logical DELAY-function... but I don't wanna confuse you
so I'll just stop here :D ...

Again, hope this helps,
Ulf

P.S.:
What's your problem ;) ? A lost manual?
You still can use Foxy's online-help :D !
« Last Edit: May 27, 2003, 02:11:39 PM by DonULFonso »

Offline Replicant

  • Gold Member
  • *****
  • Posts: 3567
Cougar HOTAS - help required
« Reply #2 on: May 27, 2003, 04:04:05 PM »
Thanks very much for the reply.  I had tried using the online help but I wasn't sure which part to look under.  I eventually found my manual and found a suitable bit of code within the digital axis section

I've used:-

MIX 3 Move_Left ^ Move_Right

MIY 3 Move_Down ^ Move_Up  

But I will try your code and see how it fairs.

Thanks again

Cheers
NEXX

Offline DonULFonso

  • Zinc Member
  • *
  • Posts: 98
      • http://www.Thrustmaster-X-Files.de
Cougar HOTAS - help required
« Reply #3 on: May 27, 2003, 05:28:28 PM »
The "type 3" you've posted will result in 4-way PLUS CORNERs -
if that's what you want then use it, if not, try my examples.

BTW, the "type 3" actually is 'the same' as a "type 2" with "/H"old slash-modifiers.

The reason why I used the "type 5" simply was
that this way you can DEcrease the bands' sizes
until you find values which allow for a 'good' control.
Just try to directly hit the correct direction with your "type 3" -
it's rather hard since the MICROSTICK's axes don't have any detents
like e.g. the JOYSTICK's axes.