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., 675 Mass Ave, Cambridge, MA 02139, 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_COMPASS_CH 5
35 #define ATC_STEPPER_HOME 0xC0
51 char radio_display_file[256];
52 char stepper_file[256];
54 unsigned char radio_display_data[ATC_RADIO_DISPLAY_BYTES];
56 SGPropertyNode *lamps_out_node;
57 SGPropertyNode *radio_display_node;
58 SGPropertyNode *steppers_node;
62 bool do_radio_display();
65 // hardwired stepper motor code
66 float compass_position;
70 // Constructor: The _board parameter specifies which board to
71 // reference. Possible values are 0 or 1. The _config_file
72 // parameter specifies the location of the output config file (xml)
73 FGATCOutput( const int _board, const SGPath &_config_file );
78 // need to pass in atc hardware lock_fd so that the radios and
79 // lamps can be blanked and so that the compass can be homed.
80 bool open( int lock_fd );
82 // process the hardware outputs. This code assumes the calling
83 // layer will lock the hardware.
90 #endif // _FG_ATC_OUTPUTS_HXX