~jtaylor/ubuntu/oneiric/flightgear/fix-749249

« back to all changes in this revision

Viewing changes to src/Network/net_ctrls.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Ove Kaaven
  • Date: 2006-05-17 17:12:09 UTC
  • mfrom: (1.1.5 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060517171209-9qbwm4q1uj05vhcj
Tags: 0.9.10-2
Updated the build dependencies for xorg 7.0. Apparently the
amd64 autobuilder doesn't use Provides.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
//
7
7
// This file is in the Public Domain, and comes with no warranty.
8
8
//
9
 
// $Id: net_ctrls.hxx,v 1.23 2005/11/05 20:03:36 curt Exp $
 
9
// $Id: net_ctrls.hxx,v 1.24 2006-01-20 17:19:02 ehofman Exp $
10
10
 
11
11
 
12
12
#ifndef _NET_CTRLS_HXX
20
20
// I am not aware of any platforms that don't use 4 bytes for float
21
21
// and 8 bytes for double.
22
22
 
23
 
const uint32_t FG_NET_CTRLS_VERSION = 26;
 
23
//    !!! IMPORTANT !!!
 
24
/* There is some space reserved in the protocol for future use.
 
25
 * When adding a new type, add it just before the "reserved" definition
 
26
 * and subtract the size of this new type from the RESERVED_SPACE definition
 
27
 * (1 for (u)int32_t or float and 2 for double).
 
28
 *      
 
29
 * This way the protocol will be forward and backward compatible until
 
30
 * RESERVED_SPACE becomes zero.
 
31
 */
 
32
 
 
33
#define RESERVED_SPACE 25
 
34
const uint32_t FG_NET_CTRLS_VERSION = 27;
24
35
 
25
36
 
26
37
// Define a structure containing the control parameters
32
43
    enum {
33
44
        FG_MAX_ENGINES = 4,
34
45
        FG_MAX_WHEELS = 16,
35
 
        FG_MAX_TANKS = 6
 
46
        FG_MAX_TANKS = 8
36
47
    };
37
48
 
38
49
    uint32_t version;                    // increment when data values change
45
56
    double elevator_trim;                // -1 ... 1
46
57
    double rudder_trim;                  // -1 ... 1
47
58
    double flaps;                        //  0 ... 1
 
59
    double spoilers;
 
60
    double speedbrake;
48
61
 
49
62
    // Aero control faults
50
63
    uint32_t flaps_power;                 // true = power available
61
74
    double condition[FG_MAX_ENGINES];    //  0 ... 1
62
75
    uint32_t fuel_pump_power[FG_MAX_ENGINES];// true = on
63
76
    double prop_advance[FG_MAX_ENGINES]; //  0 ... 1
 
77
    uint32_t feed_tank_to[4];
 
78
    uint32_t reverse[4];
 
79
 
64
80
 
65
81
    // Engine faults
66
82
    uint32_t engine_ok[FG_MAX_ENGINES];
73
89
    // Fuel management
74
90
    uint32_t num_tanks;                      // number of valid tanks
75
91
    uint32_t fuel_selector[FG_MAX_TANKS];    // false = off, true = on
 
92
    uint32_t xfer_pump[5];                   // specifies transfer from array
 
93
                                             // value tank to tank specified by
 
94
                                             // int value
76
95
    uint32_t cross_feed;                     // false = off, true = on
77
96
 
78
97
    // Brake controls
87
106
 
88
107
    // Switches
89
108
    uint32_t master_avionics;
 
109
    
 
110
        // nav and Comm
 
111
    double      comm_1;
 
112
    double      comm_2;
 
113
    double      nav_1;
 
114
    double      nav_2;
90
115
 
91
116
    // wind and turbulance
92
117
    double wind_speed_kt;
112
137
                                         // 0x01=master
113
138
                                         // 0x02=position
114
139
                                         // 0x04=fuel
 
140
 
 
141
    // --- New since FlightGear 0.9.10 (FG_NET_CTRLS_VERSION = 27)
 
142
 
 
143
    // --- Add new variables just before this line.
 
144
 
 
145
    uint32_t reserved[RESERVED_SPACE];   // 100 bytes reserved for future use.
115
146
};
116
147
 
117
148