]> git.mxchange.org Git - flightgear.git/blob - Controls/controls.h
d9f6ec5d16e3b78fe0685adc5f58072a8f2b7d65
[flightgear.git] / Controls / controls.h
1 /**************************************************************************
2  * controls.h -- defines a standard interface to all flight sim controls
3  *
4  * Written by Curtis Olson, started May 1997.
5  *
6  * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  * $Id$
23  * (Log is kept at end of this file)
24  **************************************************************************/
25
26
27 #ifndef CONTROLS_H
28 #define CONTROLS_H
29
30
31 #include "../Include/limits.h"
32
33
34 /* Define a structure containing the control parameters */
35
36 struct fgCONTROLS {
37     double aileron;
38     double elevator;
39     double elevator_trim;
40     double rudder;
41     double throttle[FG_MAX_ENGINES];
42 };
43
44
45 #define FG_Elevator     c->elevator
46 #define FG_Aileron      c->aileron
47 #define FG_Rudder       c->rudder
48 #define FG_Throttle     c->throttle
49 #define FG_Throttle_All -1
50 #define FG_Elev_Trim    c->elevator_trim
51
52 /* 
53 #define Left_button     cockpit_.left_pb_on_stick
54 #define Right_button    cockpit_.right_pb_on_stick
55 #define First_trigger   cockpit_.trig_pos_1
56 #define Second_trigger  cockpit_.trig_pos_2
57 #define Left_trim       cockpit_.left_trim
58 #define Right_trim      cockpit_.right_trim
59 #define SB_extend       cockpit_.sb_extend
60 #define SB_retract      cockpit_.sb_retract
61 #define Gear_sel_up     cockpit_.gear_sel_up 
62 */
63
64
65 void fgControlsInit( void );
66
67 void fgElevMove(double amt);
68 void fgElevSet(double pos);
69 void fgElevTrimMove(double amt);
70 void fgElevTrimSet(double pos);
71 void fgAileronMove(double amt);
72 void fgAileronSet(double pos);
73 void fgRudderMove(double amt);
74 void fgRudderSet(double pos);
75 void fgThrottleMove(int engine, double amt);
76 void fgThrottleSet(int engine, double pos);
77
78
79
80 #endif /* CONTROLS_H */
81
82
83 /* $Log$
84 /* Revision 1.8  1998/01/19 18:40:22  curt
85 /* Tons of little changes to clean up the code and to remove fatal errors
86 /* when building with the c++ compiler.
87 /*
88  * Revision 1.7  1997/12/15 23:54:36  curt
89  * Add xgl wrappers for debugging.
90  * Generate terrain normals on the fly.
91  *
92  * Revision 1.6  1997/12/10 22:37:41  curt
93  * Prepended "fg" on the name of all global structures that didn't have it yet.
94  * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
95  *
96  * Revision 1.5  1997/08/27 03:30:02  curt
97  * Changed naming scheme of basic shared structures.
98  *
99  * Revision 1.4  1997/07/23 21:52:18  curt
100  * Put comments around the text after an #endif for increased portability.
101  *
102  * Revision 1.3  1997/05/31 19:16:27  curt
103  * Elevator trim added.
104  *
105  * Revision 1.2  1997/05/23 15:40:33  curt
106  * Added GNU copyright headers.
107  *
108  * Revision 1.1  1997/05/16 15:59:48  curt
109  * Initial revision.
110  *
111  */