4 XCSoar Glide Computer - http://www.xcsoar.org/
5 Copyright (C) 2000-2013 The XCSoar Project
6 A detailed list of copyright holders can be found in the file "AUTHORS".
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef XCSOAR_INPUT_QUEUE_HPP
25 #define XCSOAR_INPUT_QUEUE_HPP
27 #include "Math/fixed.hpp"
34 typedef void (*pt2Event
)(const TCHAR
*);
39 bool processNmea(unsigned key
);
40 bool processGlideComputer(unsigned gce_id
);
42 void DoQueuedEvents();
45 // GCE = Glide Computer Event
54 GCE_FLIGHTMODE_CRUISE
,
55 GCE_FLIGHTMODE_FINALGLIDE
,
56 GCE_FLIGHTMODE_FINALGLIDE_TERRAIN
,
57 GCE_FLIGHTMODE_FINALGLIDE_ABOVE
,
58 GCE_FLIGHTMODE_FINALGLIDE_BELOW
,
59 GCE_GPS_CONNECTION_WAIT
,
64 GCE_STARTUP_SIMULATOR
,
66 GCE_TASK_NEXTWAYPOINT
,
72 GCE_ALTERNATE_CHANGED
,
73 GCE_LANDABLE_UNREACHABLE
,
74 GCE_COUNT
// How many we have for arrays etc
77 // NE = NMEA Events (hard coded triggered events from the NMEA processor)
79 NE_DOWN_IN_FLAP_POS
= 0,
80 NE_DOWN_IN_FLAP_ZERO
= 1,
81 NE_DOWN_IN_FLAP_NEG
= 2,
83 NE_DOWN_IN_GEAR_RETRACTED
= 4,
84 NE_DOWN_IN_GEAR_EXTENDED
= 5,
85 NE_DOWN_IN_AIRBRAKENOTLOCKED
= 6,
89 NE_DOWN_IN_CIRCLING_PDA
= 10,
90 NE_DOWN_IN_CIRCLING_FLARM
= 11,
91 NE_DOWN_IN_FLYING
= 12,
92 NE_DOWN_IN_NOTFLYING
= 13,
93 NE_DOWN_IN_PDA_CONNECTED
= 14,
94 NE_DOWN_IN_VELOCITY_MANOEUVERING
= 15,
95 NE_DOWN_IN_VELOCITY_FLAP
= 16,
96 NE_DOWN_IN_VELOCITY_AIRBRAKE
= 17,
97 NE_DOWN_IN_VELOCITY_TERRAIN
= 18,
98 NE_DOWN_IN_VELOCITY_NEVEREXCEED
= 19,
100 NE_DOWN_IN_AIRBRAKELOCKED
= 21,
101 NE_DOWN_IN_TAKINGOFF
= 22,
102 NE_DOWN_IN_USERSWUP
= 23,
103 NE_DOWN_IN_USERSWMIDDLE
= 24,
104 NE_DOWN_IN_USERSWDOWN
= 25,
113 NE_DOWN_OUT_CIRCLING
= 32,
114 NE_DOWN_OUT_VELOCITY_MANOEUVERING
= 33,
115 NE_DOWN_OUT_VELOCITY_FLAP
= 34,
116 NE_DOWN_OUT_VELOCITY_AIRBRAKE
= 35,
117 NE_DOWN_OUT_VELOCITY_TERRAIN
= 36,
118 NE_DOWN_OUT_VELOCITY_NEVEREXCEED
= 37,
119 NE_DOWN_OUT_GEAR_LANDING
= 38,
120 NE_DOWN_OUT_FLAP_LANDING
= 39,
121 NE_DOWN_OUT_AIRBRAKE_TAKEOFF
= 40,
122 NE_DOWN_OUT_STALL
= 41,
147 NE_UP_IN_FLAP_POS
= 64,
148 NE_UP_IN_FLAP_ZERO
= 65,
149 NE_UP_IN_FLAP_NEG
= 66,
151 NE_UP_IN_GEAR_RETRACTED
= 68,
152 NE_UP_IN_GEAR_EXTENDED
= 69,
153 NE_UP_IN_AIRBRAKENOTLOCKED
= 70,
157 NE_UP_IN_CIRCLING_PDA
= 74,
158 NE_UP_IN_CIRCLING_FLARM
= 75,
160 NE_UP_IN_NOTFLYING
= 77,
161 NE_UP_IN_PDA_CONNECTED
= 78,
162 NE_UP_IN_VELOCITY_MANOEUVERING
= 79,
163 NE_UP_IN_VELOCITY_FLAP
= 80,
164 NE_UP_IN_VELOCITY_AIRBRAKE
= 81,
165 NE_UP_IN_VELOCITY_TERRAIN
= 82,
166 NE_UP_IN_VELOCITY_NEVEREXCEED
= 83,
168 NE_UP_IN_AIRBRAKELOCKED
= 85,
169 NE_UP_IN_TAKINGOFF
= 86,
170 NE_UP_IN_USERSWUP
= 87,
171 NE_UP_IN_USERSWMIDDLE
= 88,
172 NE_UP_IN_USERSWDOWN
= 89,
181 NE_UP_OUT_CIRCLING
= 96,
182 NE_UP_OUT_VELOCITY_MANOEUVERING
= 97,
183 NE_UP_OUT_VELOCITY_FLAP
= 98,
184 NE_UP_OUT_VELOCITY_AIRBRAKE
= 99,
185 NE_UP_OUT_VELOCITY_TERRAIN
= 100,
186 NE_UP_OUT_VELOCITY_NEVEREXCEED
= 101,
187 NE_UP_OUT_GEAR_LANDING
= 102,
188 NE_UP_OUT_FLAP_LANDING
= 103,
189 NE_UP_OUT_AIRBRAKE_TAKEOFF
= 104,
190 NE_UP_OUT_STALL
= 105,
195 NE_UNUSED_37
= 108, // XXX Duplicate of above
210 NE_UNUSED_52
= 122, // XXX Duplicate of above
216 NE_COUNT
= 132, // How many we have for arrays etc // XXX Increased arbitrarily for duplicates above