%
% Joystick controls for typical PC joystick.
%
% Controller axes are numbered from A0 to A[n-1], (n is the number of axes).
% Controller buttons are number from B0 to B[m-1], (m is the number of
% buttons).
%
% Variable names are:
%   DF, DG:  Flaps, gear (0 = retracted, 1 = extended)
%   DA, DE, DR:  Aileron, elevator, rudder (-1..1).
%   DE_T:  Elevator trim (-1..1).
%   DP_i:  i-th power lever (counting from 0; (0..1)).
%   DB_i:  i-th wheel brake (counting from 0 (left brake); (0..1))
%
% Manipulators are:
% Axes:
%   set(var, value, offset):  Set var to "(axis position) * value + offset"
%     Axis position is between 0 and 1
%
% Buttons:
%   set(var, value):  Set var to value.
%   add(var, delta, min, max):  Add delta to var, keep it between min and max.
%   toggle(var):  Set var to 0 if it's 1 or to 1 otherwise.
%   toggle(var, min, max, step) Change var between min and max adding step.
%

%
% The controllers_supported section defines controllers supported by this
% configuration file.  The block consists of the sequence of "controller"
% expressions.  Controllers mapped by the Flight Simulator have to match at
% least one of the "Controller" expressions.  The expression consists of five
% parts (controller name, minimal number of buttons, maximal number of buttons,
% minimal number of axes, maximal number of axes).  The controller name is a
% regular expression that has to match the product name reported by the USB
% layer.  All conditions have to be fulfilled for the configuration file to be
% used.
%

%
% Generic controls for a single-engine aircraft.  Supports elevator, aileron,
% power and rudder and one POV to set the horizontal angle if present.
%

controllers_supported = [
  Controller('*', 0, 100, 0, 100)
]

button_press = [
]

axes = [
  A1  set(DE, 1.0, 0.0)
  A0  set(DA, 1.0, 0.0)
  A2  set(DP_0, -0.5, 0.5)
  A3  set(DR, 1.0, 0.0)
]

povs = [
  P0  set(HAngle, 1.0, 0.0)
]
