Hoppie Home
GoFlight Bridge
|
Load the DLL into Tcl with load gftcl. This sets up the GoFlight
interface. Each connected device has a device type code (a straightforward
string, such as GF166) and a device number (starts from zero). All
devices are uniquely identified by type and number. It depends on the USB
wiring which device gets which number.
GoFlight Tcl Commands
The new Tcl commands are provided in the gf:: name space. They
are:
gf::version |
Returns the version string of the DLL, such as 1.2. |
|
gf::devices |
Returns a list containing all supported devices and the
detected number of them. List is suitable for use by array set. An
example is: {GF166 1 GF45 1 GF46 2 GFLGT 0 GFP8 0 GFT8 0 GFTQ6 1}. At
the moment, hot plug USB is not yet supported. The list is created once, at
DLL load time, and not updated while the DLL is active. A restart of the
application will re-poll all available devices. |
|
gf::notify eventProc |
Registers a GoFlight input callback. The
eventProc script is called with four parameters: devType, devNr, control,
and value. If the eventProc={}, the callback is de-registered. Various
devices have different control strings. For a list, see GoFlight Input
Events. If during the callback a Tcl error occurs, the bgerror
procedure is called, just as with standard Tcl event handling procedures. |
|
gf::gf166 devNr cmd value |
Sends commands to the selected GF166 radio
panel. Recognised commands are setLeftDisplay, setRightDisplay, setLeftLED,
setCenterLED (not available in all GF166 units), and setRightLED. Values are
either numerical or 0/1. Also setBrightness 0..15. |
|
gf::gf45 devNr cmd value |
Sends commands to the selected GF45 panel.
Recognised commands are setAlpha and setNumeric. Values are strings for the
alpha display and numbers for the numerical one. Also setBrightness
0..15. |
|
gf::gf46 devNr cmd value |
Sends commands to the selected GF46 panel.
Recognised commands are setAlpha and setNumeric. Values are strings for the
alpha display and numbers for the numerical one. Also setBrightness
0..15. |
|
gf::gfp8 devNr cmd value |
Sends commands to the selected GFP8 panel.
Recognised commands are setLEDx, with x=1..8. Values are 0/1. Also
setBrightness 0..15. |
|
gf::gft8 devNr cmd value |
Sends commands to the selected GFT8 panel.
Recognised commands are setLEDx, with x=1..8. Values are 0/1. Also
setBrightness 0..15. |
|
gf::gftq6 devNr leverCode minRaw maxRaw jitter steps |
Calibrates one
of the TQ6 levers. Lever codes are "levA" to "levF", counting from left
to right. minRaw and maxRaw are the true output values of
the lever in its fully up (min) and down (max) positions, i.e., the values
obtained without any calibration command having been given yet.
jitter is the minimum raw number change that must occur before a
change event is reported, to reduce the event stream volume. steps
is the number of output positions that the lever will show after
calibration, starting from zero up to steps. At DLL load time, all
levers are calibrated 0 255 1 255, so they have the full hardware
throw (limited only by the casing) and no jitter suppression. |
|
GoFlight Input Events
These events are generated whenever any input control (button, knob, or
switch) is operated on any of the attached GoFlight panels. They are
asynchronously received by the Tcl procedure registered with
gf::notify.
If more than one control is operated at the same time, e.g., two push
buttons are pressed together, the result is undefined. You may get one or
two events, and the control name might or might not be what you would
expect. However, you will never get rubbish. Usually everything syncs up
right after releasing the buttons, or worst case by toggling a GFT8
switch once more.
In order to help you, push buttons only generate an event when they are
depressed. Not when they are released.
GF166 |
left Value: 1. Occurs when left push button
pushed.
center Value: 1. Occurs when center push button pushed.
right Value: 1. Occurs when right push button pushed.
inner Value: -1 or 1. Occurs when inner knob turned left
or right.
outer Value: -1 or 1. Occurs when outer knob turned
left or right. |
|
GF45 |
left Value: -1 or 1. Occurs when left knob turned left
or right.
right Value: -1 or 1. Occurs when right knob turned left
or right. |
|
GF46 |
outer Value: -1 or 1. Occurs when outer knob turned left
or right.
inner Value: -1 or 1. Occurs when inner knob turned left or
right.
button Value: 1. Occurs when the pushbutton is pushed. |
|
GFP8 |
buttonX Value: 1. Occurs when button X (1=leftmost,
8=rightmost) is pushed. |
|
GFT8 |
switchX Value: 0 (down) or 1 (up). Occurs when switch X
(1=leftmost, 8=rightmost) is toggled. |
|
GFTQ6 |
levers Value: a list containing the current (calibrated)
positions of all six levers A to F and all six thrust reverser switches A to
F. On most TQ6 units, thrust reverser switches A and F are not installed. |
|
|