Subversion Repositories group.NITPanels

Rev

Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 pfowler 1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
 
7
using Microsoft.FlightSimulator.SimConnect;
8
using System.Runtime.InteropServices;
9
 
10
namespace NITNavComm {
11
    public class FSXObject {
12
 
13
        public SimData simdata;
14
        public SimConnect hSimConnect = null;
15
 
16
        public enum DATA_REQUESTS {
17
            AIRCRAFT,
18
            AVIONICS,
19
            NAVCOM1_REQ,
20
            NAVCOM2_REQ,
21
            AUDIOSEL_REQ
22
        }
23
 
24
        public enum DEFINITIONS {
25
            AIRCRAFT,
26
            AVIONICS,
27
            NAVCOM1_DATA,
28
            NAVCOM2_DATA,
29
            AUDIOSEL_DATA
30
        }
31
 
32
        public enum EVENT_ID {
33
            // AudioSel Events, these go first to make mapping easy (0-7)
34
            COM1_TRANSMIT_SELECT,
35
            COM2_TRANSMIT_SELECT,
36
            COM_RECEIVE_ALL_TOGGLE,
37
            RADIO_VOR1_IDENT_TOGGLE,
38
            RADIO_VOR2_IDENT_TOGGLE,
39
            MARKER_SOUND_TOGGLE,
40
            RADIO_DME1_IDENT_TOGGLE,
41
            RADIO_ADF_IDENT_TOGGLE,
42
 
43
            // NavCom1 Events
44
            COM1_SWAP_FREQ,
45
            NAV1_SWAP_FREQ,
46
            COM_RADIO_WHOLE_INC,
47
            COM_RADIO_WHOLE_DEC,
48
            COM_RADIO_FRACT_INC,
49
            COM_RADIO_FRACT_DEC,
50
            NAV1_RADIO_WHOLE_INC,
51
            NAV1_RADIO_WHOLE_DEC,
52
            NAV1_RADIO_FRACT_INC,
53
            NAV1_RADIO_FRACT_DEC,
54
 
55
            // NavComm2 Events
56
            COM2_SWAP_FREQ,
57
            NAV2_SWAP_FREQ,
58
            COM2_RADIO_WHOLE_INC,
59
            COM2_RADIO_WHOLE_DEC,
60
            COM2_RADIO_FRACT_INC,
61
            COM2_RADIO_FRACT_DEC,
62
            NAV2_RADIO_WHOLE_INC,
63
            NAV2_RADIO_WHOLE_DEC,
64
            NAV2_RADIO_FRACT_INC,
65
            NAV2_RADIO_FRACT_DEC,
66
        }
67
 
68
        public enum GROUP_ID {
69
            NAVCOM1,
70
            NAVCOM2,
71
            AUDIOSEL
72
        }
73
 
74
        public enum MENU_ID {
75
            NIT_PANELS,
76
        }
77
 
78
        [StructLayout(LayoutKind.Sequential, Pack = 1)]
79
        public struct SimData {
80
            public uint objectid;
81
            public Aircraft_Data aircraft;
82
        }
83
 
84
        [StructLayout(LayoutKind.Sequential, Pack = 1)]
85
        public struct NavCom_Data {
86
            public double Freq0;
87
            public double Freq1;
88
            public double Freq2;
89
            public double Freq3;
90
        }
91
 
92
        [StructLayout(LayoutKind.Sequential, Pack = 1)]
93
        public struct AudioSel_Data {
94
            public double com1;
95
            public double com2;
96
            public double comb;
97
            public double vor1;
98
            public double vor2;
99
            public double mkr;
100
            public double dme;
101
            public double adf;
102
        }
103
 
104
        [StructLayout(LayoutKind.Sequential, Pack = 1)]
105
        public struct Avionics_Data {
106
            public bool avionics_master;
107
            public double com1_status;
108
            public double com2_status;
109
            public bool nav1_available;
110
            public bool nav2_available;
111
        }
112
 
113
        [StructLayout(LayoutKind.Sequential, Pack = 1)]
114
        public struct Aircraft_Data {
115
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
116
            public string atc_type;
117
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
118
            public string atc_model;
119
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
120
            public string atc_id;
121
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
122
            public string title;
123
        }
124
 
125
        public FSXObject() {
126
            this.simdata = new SimData();
127
        }
128
 
129
        private void transmitEvent(Enum eventid, Enum groupid) {
130
            this.transmitEvent(eventid, groupid, 1);
131
        }
132
 
133
        private void transmitEvent(Enum eventid, Enum groupid, uint data) {
134
            this.hSimConnect.TransmitClientEvent(
135
                this.simdata.objectid,
136
                eventid, data, groupid,
137
                SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY
138
            );
139
        }
140
 
141
        private void requestData(Enum dataRequest, Enum definition) {
142
            hSimConnect.RequestDataOnSimObject(
143
                dataRequest,
144
                definition,
145
                this.simdata.objectid,
146
                SIMCONNECT_PERIOD.ONCE,
147
                SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT,
148
                0, 0, 0);
149
        }
150
 
151
        public void FsxInit() {
152
            this.hSimConnect.MenuAddItem("NITPanels", FSXObject.MENU_ID.NIT_PANELS, 0);
153
 
154
        }
155
 
156
        public void FsxReady() {
4 pfowler 157
 
3 pfowler 158
            this.hSimConnect.RequestDataOnSimObject(
159
                FSXObject.DATA_REQUESTS.AUDIOSEL_REQ,
160
                FSXObject.DEFINITIONS.AUDIOSEL_DATA,
161
                this.simdata.objectid,
162
                SIMCONNECT_PERIOD.SIM_FRAME,
163
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
164
                0, 0, 0);
4 pfowler 165
 
3 pfowler 166
            this.hSimConnect.RequestDataOnSimObject(
167
                FSXObject.DATA_REQUESTS.NAVCOM1_REQ,
168
                FSXObject.DEFINITIONS.NAVCOM1_DATA,
169
                this.simdata.objectid,
170
                SIMCONNECT_PERIOD.SIM_FRAME,
171
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
172
                0, 0, 0);
173
 
174
            this.hSimConnect.RequestDataOnSimObject(
175
                FSXObject.DATA_REQUESTS.NAVCOM2_REQ,
176
                FSXObject.DEFINITIONS.NAVCOM2_DATA,
177
                this.simdata.objectid,
178
                SIMCONNECT_PERIOD.SIM_FRAME,
179
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
180
                0, 0, 0);
181
 
182
            hSimConnect.RequestDataOnSimObject(
183
                FSXObject.DATA_REQUESTS.AVIONICS,
184
                FSXObject.DEFINITIONS.AVIONICS,
185
                this.simdata.objectid,
186
                SIMCONNECT_PERIOD.SIM_FRAME,
187
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
188
                0, 0, 0);
4 pfowler 189
 
3 pfowler 190
        }
191
 
4 pfowler 192
        public void MapEvents() {
193
 
194
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM1_SWAP_FREQ, "COM_STBY_RADIO_SWAP");
195
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV1_SWAP_FREQ, "NAV1_RADIO_SWAP");
196
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM_RADIO_WHOLE_INC, "COM_RADIO_WHOLE_INC");
197
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM_RADIO_WHOLE_DEC, "COM_RADIO_WHOLE_DEC");
198
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM_RADIO_FRACT_INC, "COM_RADIO_FRACT_INC");
199
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM_RADIO_FRACT_DEC, "COM_RADIO_FRACT_DEC");
200
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV1_RADIO_WHOLE_INC, "NAV1_RADIO_WHOLE_INC");
201
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV1_RADIO_WHOLE_DEC, "NAV1_RADIO_WHOLE_DEC");
202
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV1_RADIO_FRACT_INC, "NAV1_RADIO_FRACT_INC");
203
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV1_RADIO_FRACT_DEC, "NAV1_RADIO_FRACT_DEC");
204
 
205
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM2_SWAP_FREQ, "COM2_RADIO_SWAP");
206
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV2_SWAP_FREQ, "NAV2_RADIO_SWAP");
207
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM2_RADIO_WHOLE_INC, "COM2_RADIO_WHOLE_INC");
208
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM2_RADIO_WHOLE_DEC, "COM2_RADIO_WHOLE_DEC");
209
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM2_RADIO_FRACT_INC, "COM2_RADIO_FRACT_INC");
210
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM2_RADIO_FRACT_DEC, "COM2_RADIO_FRACT_DEC");
211
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV2_RADIO_WHOLE_INC, "NAV2_RADIO_WHOLE_INC");
212
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV2_RADIO_WHOLE_DEC, "NAV2_RADIO_WHOLE_DEC");
213
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV2_RADIO_FRACT_INC, "NAV2_RADIO_FRACT_INC");
214
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.NAV2_RADIO_FRACT_DEC, "NAV2_RADIO_FRACT_DEC");
215
 
216
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM1_TRANSMIT_SELECT, "COM1_TRANSMIT_SELECT");
217
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM2_TRANSMIT_SELECT, "COM2_TRANSMIT_SELECT");
218
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.COM_RECEIVE_ALL_TOGGLE, "COM_RECEIVE_ALL_TOGGLE");
219
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.RADIO_VOR1_IDENT_TOGGLE, "RADIO_VOR1_IDENT_TOGGLE");
220
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.RADIO_VOR2_IDENT_TOGGLE, "RADIO_VOR2_IDENT_TOGGLE");
221
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.MARKER_SOUND_TOGGLE, "MARKER_SOUND_TOGGLE");
222
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.RADIO_DME1_IDENT_TOGGLE, "RADIO_DME1_IDENT_TOGGLE");
223
            this.hSimConnect.MapClientEventToSimEvent(FSXObject.EVENT_ID.RADIO_ADF_IDENT_TOGGLE, "RADIO_ADF_IDENT_TOGGLE");
224
 
225
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "COM TRANSMIT:1", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
226
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "COM TRANSMIT:2", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
227
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "COM RECIEVE ALL", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
228
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "NAV SOUND:1", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
229
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "NAV SOUND:2", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
230
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "MARKER SOUND", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
231
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "DME SOUND", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
232
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AUDIOSEL_DATA, "ADF SOUND:1", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
233
            this.hSimConnect.RegisterDataDefineStruct<FSXObject.AudioSel_Data>(FSXObject.DEFINITIONS.AUDIOSEL_DATA);
234
 
235
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AIRCRAFT, "Atc Type", "", SIMCONNECT_DATATYPE.STRING32, 0.0f, SimConnect.SIMCONNECT_UNUSED);
236
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AIRCRAFT, "ATC Model", "", SIMCONNECT_DATATYPE.STRING32, 0.0f, SimConnect.SIMCONNECT_UNUSED);
237
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AIRCRAFT, "ATC ID", "", SIMCONNECT_DATATYPE.STRING32, 0.0f, SimConnect.SIMCONNECT_UNUSED);
238
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AIRCRAFT, "Title", "", SIMCONNECT_DATATYPE.STRING128, 0.0f, SimConnect.SIMCONNECT_UNUSED);
239
            this.hSimConnect.RegisterDataDefineStruct<FSXObject.Aircraft_Data>(FSXObject.DEFINITIONS.AIRCRAFT);
240
 
241
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AVIONICS, "Avionics Master Switch", "bool", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
242
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AVIONICS, "Com Status:1", "Enum", SIMCONNECT_DATATYPE.FLOAT64, 0, SimConnect.SIMCONNECT_UNUSED);
243
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AVIONICS, "Com Status:2", "Enum", SIMCONNECT_DATATYPE.FLOAT64, 0, SimConnect.SIMCONNECT_UNUSED);
244
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AVIONICS, "Nav Available:1", "bool", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
245
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.AVIONICS, "Nav Available:2", "bool", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
246
            this.hSimConnect.RegisterDataDefineStruct<FSXObject.Avionics_Data>(FSXObject.DEFINITIONS.AVIONICS);
247
 
248
 
249
            // NavComm1 Frequencies
250
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM1_DATA, "Com Active Frequency:1", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
251
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM1_DATA, "Com Standby Frequency:1", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
252
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM1_DATA, "Nav Active Frequency:1", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
253
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM1_DATA, "Nav Standby Frequency:1", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
254
            this.hSimConnect.RegisterDataDefineStruct<FSXObject.NavCom_Data>(FSXObject.DEFINITIONS.NAVCOM1_DATA);
255
 
256
            // NavComm2 Frequencies
257
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM2_DATA, "Com Active Frequency:2", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
258
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM2_DATA, "Com Standby Frequency:2", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
259
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM2_DATA, "Nav Active Frequency:2", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
260
            this.hSimConnect.AddToDataDefinition(FSXObject.DEFINITIONS.NAVCOM2_DATA, "Nav Standby Frequency:2", "Number", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
261
            this.hSimConnect.RegisterDataDefineStruct<FSXObject.NavCom_Data>(FSXObject.DEFINITIONS.NAVCOM2_DATA);
262
 
263
        }
264
 
3 pfowler 265
        // Individual data requests
266
        public void requestNavComm1Data() {
267
            this.requestData(FSXObject.DATA_REQUESTS.NAVCOM1_REQ, FSXObject.DEFINITIONS.NAVCOM1_DATA);
268
        }
269
 
270
        public void requestNavComm2Data() {
271
            this.requestData(FSXObject.DATA_REQUESTS.NAVCOM2_REQ, FSXObject.DEFINITIONS.NAVCOM2_DATA);
272
        }
273
 
274
        public void requestAudioSelData() {
275
            this.requestData(FSXObject.DATA_REQUESTS.AUDIOSEL_REQ, FSXObject.DEFINITIONS.AUDIOSEL_DATA);
276
        }
277
 
278
        // AudioSel Events
279
        public void AudioSelButton(int button) {
280
            this.transmitEvent((FSXObject.EVENT_ID)button, FSXObject.GROUP_ID.AUDIOSEL);
281
        }
282
 
283
 
284
        // NavComm1 Events
285
        public void Comm1DecFract() {
286
            this.transmitEvent(FSXObject.EVENT_ID.COM_RADIO_FRACT_DEC, FSXObject.GROUP_ID.NAVCOM1);
287
        }
288
 
289
        public void Comm1DecWhole() {
290
            this.transmitEvent(FSXObject.EVENT_ID.COM_RADIO_WHOLE_DEC, FSXObject.GROUP_ID.NAVCOM1);
291
        }
292
 
293
        public void Comm1IncFract() {
294
            this.transmitEvent(FSXObject.EVENT_ID.COM_RADIO_FRACT_INC, FSXObject.GROUP_ID.NAVCOM1);
295
        }
296
 
297
        public void Comm1IncWhole() {
298
            this.transmitEvent(FSXObject.EVENT_ID.COM_RADIO_WHOLE_INC, FSXObject.GROUP_ID.NAVCOM1);
299
        }
300
 
301
        public void Comm1SwapFreq() {
302
            this.transmitEvent(FSXObject.EVENT_ID.COM1_SWAP_FREQ, FSXObject.GROUP_ID.NAVCOM1);
303
        }
304
 
305
        public void Nav1DecFract() {
306
            this.transmitEvent(FSXObject.EVENT_ID.NAV1_RADIO_FRACT_DEC, FSXObject.GROUP_ID.NAVCOM1);
307
        }
308
 
309
        public void Nav1DecWhole() {
310
            this.transmitEvent(FSXObject.EVENT_ID.NAV1_RADIO_WHOLE_DEC, FSXObject.GROUP_ID.NAVCOM1);
311
        }
312
 
313
        public void Nav1IncFract() {
314
            this.transmitEvent(FSXObject.EVENT_ID.NAV1_RADIO_FRACT_INC, FSXObject.GROUP_ID.NAVCOM1);
315
        }
316
 
317
        public void Nav1IncWhole() {
318
            this.transmitEvent(FSXObject.EVENT_ID.NAV1_RADIO_WHOLE_INC, FSXObject.GROUP_ID.NAVCOM1);
319
        }
320
 
321
        public void Nav1SwapFreq() {
322
            this.transmitEvent(FSXObject.EVENT_ID.NAV1_SWAP_FREQ, FSXObject.GROUP_ID.NAVCOM1);
323
        }
324
 
325
 
326
        // NavComm2 Events
327
        public void Comm2DecFract() {
328
            this.transmitEvent(FSXObject.EVENT_ID.COM2_RADIO_FRACT_DEC, FSXObject.GROUP_ID.NAVCOM2);
329
        }
330
 
331
        public void Comm2DecWhole() {
332
            this.transmitEvent(FSXObject.EVENT_ID.COM2_RADIO_WHOLE_DEC, FSXObject.GROUP_ID.NAVCOM2);
333
        }
334
 
335
        public void Comm2IncFract() {
336
            this.transmitEvent(FSXObject.EVENT_ID.COM2_RADIO_FRACT_INC, FSXObject.GROUP_ID.NAVCOM2);
337
        }
338
 
339
        public void Comm2IncWhole() {
340
            this.transmitEvent(FSXObject.EVENT_ID.COM2_RADIO_WHOLE_INC, FSXObject.GROUP_ID.NAVCOM2);
341
        }
342
 
343
        public void Comm2SwapFreq() {
344
            this.transmitEvent(FSXObject.EVENT_ID.COM2_SWAP_FREQ, FSXObject.GROUP_ID.NAVCOM2);
345
        }
346
 
347
        public void Nav2DecFract() {
348
            this.transmitEvent(FSXObject.EVENT_ID.NAV2_RADIO_FRACT_DEC, FSXObject.GROUP_ID.NAVCOM2);
349
        }
350
 
351
        public void Nav2DecWhole() {
352
            this.transmitEvent(FSXObject.EVENT_ID.NAV2_RADIO_WHOLE_DEC, FSXObject.GROUP_ID.NAVCOM2);
353
        }
354
 
355
        public void Nav2IncFract() {
356
            this.transmitEvent(FSXObject.EVENT_ID.NAV2_RADIO_FRACT_INC, FSXObject.GROUP_ID.NAVCOM2);
357
        }
358
 
359
        public void Nav2IncWhole() {
360
            this.transmitEvent(FSXObject.EVENT_ID.NAV2_RADIO_WHOLE_INC, FSXObject.GROUP_ID.NAVCOM2);
361
        }
362
 
363
        public void Nav2SwapFreq() {
364
            this.transmitEvent(FSXObject.EVENT_ID.NAV2_SWAP_FREQ, FSXObject.GROUP_ID.NAVCOM2);
365
        }
366
 
367
 
368
 
369
    }
370
}