1 // ATC-Inputs.hxx -- Translate ATC hardware inputs to FGFS properties
3 // Written by Curtis Olson, started November 2004.
5 // Copyright (C) 2004 Curtis L. Olson - http://www.flightgear.org/~curt
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #ifndef _FG_ATC_INPUTS_HXX
25 #define _FG_ATC_INPUTS_HXX
31 #include <Main/fg_props.hxx>
33 #define ATC_ANAL_IN_VALUES 32
34 #define ATC_ANAL_IN_BYTES (2 * ATC_ANAL_IN_VALUES)
35 #define ATC_RADIO_SWITCH_BYTES 32
36 #define ATC_SWITCH_BYTES 16
37 #define ATC_NUM_COLS 8
51 char analog_in_file[256];
52 char radios_file[256];
53 char switches_file[256];
55 unsigned char analog_in_bytes[ATC_ANAL_IN_BYTES];
56 int analog_in_data[ATC_ANAL_IN_VALUES];
57 unsigned char radio_switch_data[ATC_RADIO_SWITCH_BYTES];
58 unsigned char switch_data[ATC_SWITCH_BYTES];
60 SGPropertyNode *ignore_flight_controls;
61 SGPropertyNode *ignore_pedal_controls;
63 SGPropertyNode *analog_in_node;
64 SGPropertyNode *radio_in_node;
65 SGPropertyNode *switches_node;
69 bool do_radio_switches();
74 // Constructor: The _board parameter specifies which board to
75 // reference. Possible values are 0 or 1. The _config_file
76 // parameter specifies the location of the input config file (xml)
77 FGATCInput( const int _board, const SGPath &_config_file );
84 // process the hardware inputs. This code assumes the calling
85 // layer will lock the hardware.
92 #endif // _FG_ATC_INPUTS_HXX