1 // atc610x.hxx -- FGFS interface to ATC 610x hardware
3 // Written by Curtis Olson, started January 2002.
5 // Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
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_ATC610X_HXX
25 #define _FG_ATC610X_HXX
31 #include <plib/netChat.h>
33 #include <Main/fg_props.hxx>
35 #include "protocol.hxx"
38 #define ATC_ANAL_IN_VALUES 32
39 #define ATC_ANAL_IN_BYTES (2 * ATC_ANAL_IN_VALUES)
40 #define ATC_COMPASS_CH 5
41 #define ATC_STEPPER_HOME 0xC0
42 #define ATC_RADIO_DISPLAY_BYTES 48
43 #define ATC_RADIO_SWITCH_BYTES 32
44 #define ATC_SWITCH_BYTES 16
45 #define ATC_NUM_COLS 8
48 class FGATC610x : public FGProtocol {
60 char analog_in_file[256];
62 char radios_file[256];
63 char stepper_file[256];
64 char switches_file[256];
66 unsigned char analog_in_bytes[ATC_ANAL_IN_BYTES];
67 int analog_in_data[ATC_ANAL_IN_VALUES];
68 unsigned char radio_display_data[ATC_RADIO_DISPLAY_BYTES];
69 unsigned char radio_switch_data[ATC_RADIO_SWITCH_BYTES];
70 unsigned char switch_data[ATC_SWITCH_BYTES];
72 float compass_position;
73 SGPropertyNode *mag_compass;
74 SGPropertyNode *dme_min, *dme_kt, *dme_nm;
75 SGPropertyNode *com1_freq, *com1_stby_freq;
76 SGPropertyNode *com2_freq, *com2_stby_freq;
77 SGPropertyNode *nav1_freq, *nav1_stby_freq;
78 SGPropertyNode *nav2_freq, *nav2_stby_freq;
79 SGPropertyNode *adf_adf_btn, *adf_bfo_btn;
80 SGPropertyNode *adf_on_off_vol;
81 SGPropertyNode *adf_freq, *adf_stby_freq;
82 SGPropertyNode *adf_stby_mode, *adf_timer_mode;
83 SGPropertyNode *adf_count_mode, *adf_flight_timer, *adf_elapsed_timer;
84 SGPropertyNode *adf_ant_ann, *adf_adf_ann, *adf_bfo_ann, *adf_frq_ann;
85 SGPropertyNode *adf_flt_ann, *adf_et_ann;
86 SGPropertyNode *inner, *middle, *outer;
87 SGPropertyNode *xpdr_ident_btn;
88 SGPropertyNode *xpdr_digit1, *xpdr_digit2, *xpdr_digit3, *xpdr_digit4;
89 SGPropertyNode *xpdr_func_knob, *xpdr_id_code, *xpdr_flight_level;
90 SGPropertyNode *xpdr_fl_ann, *xpdr_alt_ann, *xpdr_gnd_ann, *xpdr_on_ann;
91 SGPropertyNode *xpdr_sby_ann, *xpdr_reply_ann;
97 bool do_radio_switches();
98 bool do_radio_display();
116 #endif // _FG_ATC610X_HXX