1 // ATC-Outputs.hxx -- Translate FGFS properties into ATC hardware outputs
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_OUTPUTS_HXX
25 #define _FG_ATC_OUTPUTS_HXX
31 #include <Main/fg_props.hxx>
33 #define ATC_RADIO_DISPLAY_BYTES 48
34 #define ATC_ANALOG_OUT_CHANNELS 48
35 #define ATC_COMPASS_CH 5
36 #define ATC_STEPPER_HOME 0xC0
51 char analog_out_file[256];
53 char radio_display_file[256];
54 char stepper_file[256];
56 unsigned char analog_out_data[ATC_ANALOG_OUT_CHANNELS*2];
57 unsigned char radio_display_data[ATC_RADIO_DISPLAY_BYTES];
59 SGPropertyNode_ptr analog_out_node;
60 SGPropertyNode_ptr lamps_out_node;
61 SGPropertyNode_ptr radio_display_node;
62 SGPropertyNode_ptr steppers_node;
67 bool do_radio_display();
70 // hardwired stepper motor code
71 float compass_position;
75 // Constructor: The _board parameter specifies which board to
76 // reference. Possible values are 0 or 1. The _config_file
77 // parameter specifies the location of the output config file (xml)
78 FGATCOutput( const int _board, const SGPath &_config_file );
83 // need to pass in atc hardware lock_fd so that the radios and
84 // lamps can be blanked and so that the compass can be homed.
85 bool open( int lock_fd );
87 // process the hardware outputs. This code assumes the calling
88 // layer will lock the hardware.
95 #endif // _FG_ATC_OUTPUTS_HXX