Trackball Pro Operation
In addition to game controllers, the Control Manager supports the
CH TrackBall Pro USB as a controller that can be included in a map.
The TrackBall can be programmed as a mouse, a joystick, or referenced
in a script file. It can also be used as a standard mouse without needing
to be programmed at all. This section discusses the TrackBall and how
it interacts with the Control Manager.
It should be noted that the Trackball does not create a new
HID device to represent itself as the joysticks do. With joysticks in
Direct Mode, you would get a New Hardware Wizard for the stick and it would
eventually show up in the Game Controllers applet as a
FlightStick, etc. Likewise, the first time you activate a map, you'll
get new hardware wizards for the Control Manager Devices that the map
creates. The Trackball simply uses the existing HID for the Aux2 Device
that the Control Manager creates, you won't see another mouse materialize.
Using the Trackball without Mapping
You can operate the trackball as a standalone device, it need not be
included in the map, and it will operate as a system mouse just as you'd
expect. It operates essentially independently of the Control Manager
mapping, and there are a variety of functions that can be assigned to
the Trackball buttons. See the section on Trackball Options
for details on the functions available and how to set them.
Using the Trackball In the Map
If you put the trackball into the map, its action is defined by
the map itself. You can assign it to be a mouse, a joystick, or access
it from within a CMS script.
Direct Mode
When the Control Manager is in Direct Mode, the Trackball just
operates as a Trackball with 4 buttons. It will act basically
as it does when it's not in the map at all. It generates the
expected system mouse signals and the button options described
in the section on Trackball Options are in
effect.
There is no "Test" function for the Trackball in Direct Mode. If
it's working, it's being seen as a system mouse and it should be
moving the mouse cursor and providing whatever options have been
set for it.
Mapped Mode
Running the Trackball with the CM in Mapped Mode is a bit different. The
options set for it no longer have any effect, and in fact the default
setting is to treat it as another joystick. Consequently there are some
differences that need to be mentioned.
When you first add the Trackball to a map, it originally shows
up as a Joystick, e.g. the X and Y axes will be assigned to CM Device 1
or whatever. If you download that, you'll find that your Control
Manager Device responds to the trackball and the mouse cursor
does not. This joystick doesn't return to the middle when you
release it of course, it just stays wherever you put it. It
usually does not start centered, either. You can look at the
joystick output from the GUI or from the Windows Game Controllers
Applet since it is really being seen as a joystick.
To use it as a mouse, you can assign the X and Y axes to the
Mouse X and Y in your map. Then it will operate as a mouse much
the same as the ministick on the ProThrottle did, though being a
real Trackball it's much more precise. Note that if you assign
the Trackball to be the mouse, you won't be able to assign the
ministick as it will create a control conflict because you're assigning
two devices (Trackball and Ministick) to the same DX Device.
There is a way to do this using the CMS scripting. There's an
example of how to do this in the Sample Scripts
section.
You can also refer to the Trackball in a CMS file just as you
would a joystick, e.g. JS1.A1, JS1.B2, etc. There are a couple of
differences, though. First, mouse data is inherently different than
joystick data. Mice send out a number indicating how far they've moved
since their last report. They only send the report one time, and the
values are rather small. If you really roll the ball, you might
see a value as high as 32 or so, but in normal operation you'll
see values of 3 or 4 or so and they'll only last very briefly.
Joysticks, on the other hand, send out a number indicating how
far from center they are. The value is continuous and will range
from 0 to 255.
When you're using it as a mouse, remember that the size of the
values is likely to be very small. Also remember that CMS does
"integer" math, it doesn't have a clue about fractions. That
means that if you're rolling the ball slowly, it's occasionally
generating just a single count. Your probably seeing a value of
"1" or no value at all. If you do any math on this value that
tends to reduce its value, say multiplying it by 99/100 (99%) to
scale it down the tiniest amount, the "1" becomes "something less
than 1" and the only thing less than "1" is "0". The mouse won't
move at all.
The Mouse Sensitivity setting on the Program Settings tab only
affects joysticks assigned to the mouse. It's not used with the
trackball. You have to use the axis parameters to set the
sensitivity in Mapped Mode. Actually, you can do it that way with
sticks used as mice, too, but the Program Settings parameter is
probably preferable since it will effectively adjust all the mouse
settings at once where using the individual axes requires that a
user wanting to change the mouse sensitivity overall has to find
all assignments in the map and change them one at a time.
One other thing needs mentioning. The Program Settings value for
mouse sensitivity will affect joysticks
assigned to mice, but not CMS devices assigned to mice. Consequently,
if you send a joystick to a CMS value and then send that CMS value
to a mouse axis, you'll need to make any sensitivity adjustments
on an axis-by-axis basis. The reason for this is that the map
cannot know where the CMS value came from and so cannot decide
whether it's a joystick or not.