Subversion Repositories group.electronics

Rev

Rev 156 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 157
Line 61... Line 61...
61
            COM2_RADIO_FRACT_DEC,
61
            COM2_RADIO_FRACT_DEC,
62
            NAV2_RADIO_WHOLE_INC,
62
            NAV2_RADIO_WHOLE_INC,
63
            NAV2_RADIO_WHOLE_DEC,
63
            NAV2_RADIO_WHOLE_DEC,
64
            NAV2_RADIO_FRACT_INC,
64
            NAV2_RADIO_FRACT_INC,
65
            NAV2_RADIO_FRACT_DEC,
65
            NAV2_RADIO_FRACT_DEC,
66
 
-
 
67
        }
66
        }
68
 
67
 
69
        public enum GROUP_ID {
68
        public enum GROUP_ID {
70
            NAVCOM1,
69
            NAVCOM1,
71
            NAVCOM2,
70
            NAVCOM2,
72
            AUDIOSEL
71
            AUDIOSEL
73
        }
72
        }
74
 
73
 
-
 
74
        public enum MENU_ID {
-
 
75
            NIT_PANELS,
-
 
76
        }
-
 
77
 
-
 
78
        [StructLayout(LayoutKind.Sequential, Pack = 1)]
75
        public struct SimData {
79
        public struct SimData {
76
            public uint objectid;
80
            public uint objectid;
77
            public Aircraft_Data aircraft;
81
            public Aircraft_Data aircraft;
78
        }
82
        }
79
 
83
 
Line 142... Line 146...
142
                SIMCONNECT_PERIOD.ONCE,
146
                SIMCONNECT_PERIOD.ONCE,
143
                SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT,
147
                SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT,
144
                0, 0, 0);
148
                0, 0, 0);
145
        }
149
        }
146
 
150
 
-
 
151
        public void FsxInit() {
-
 
152
            this.hSimConnect.MenuAddItem("NITPanels", FSXObject.MENU_ID.NIT_PANELS, 0);
-
 
153
 
-
 
154
        }
-
 
155
 
-
 
156
        public void FsxReady() {
-
 
157
            this.hSimConnect.RequestDataOnSimObject(
-
 
158
                FSXObject.DATA_REQUESTS.AUDIOSEL_REQ,
-
 
159
                FSXObject.DEFINITIONS.AUDIOSEL_DATA,
-
 
160
                this.simdata.objectid,
-
 
161
                SIMCONNECT_PERIOD.SIM_FRAME,
-
 
162
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
-
 
163
                0, 0, 0);
-
 
164
            this.hSimConnect.RequestDataOnSimObject(
-
 
165
                FSXObject.DATA_REQUESTS.NAVCOM1_REQ,
-
 
166
                FSXObject.DEFINITIONS.NAVCOM1_DATA,
-
 
167
                this.simdata.objectid,
-
 
168
                SIMCONNECT_PERIOD.SIM_FRAME,
-
 
169
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
-
 
170
                0, 0, 0);
-
 
171
 
-
 
172
            this.hSimConnect.RequestDataOnSimObject(
-
 
173
                FSXObject.DATA_REQUESTS.NAVCOM2_REQ,
-
 
174
                FSXObject.DEFINITIONS.NAVCOM2_DATA,
-
 
175
                this.simdata.objectid,
-
 
176
                SIMCONNECT_PERIOD.SIM_FRAME,
-
 
177
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
-
 
178
                0, 0, 0);
-
 
179
 
-
 
180
            hSimConnect.RequestDataOnSimObject(
-
 
181
                FSXObject.DATA_REQUESTS.AVIONICS,
-
 
182
                FSXObject.DEFINITIONS.AVIONICS,
-
 
183
                this.simdata.objectid,
-
 
184
                SIMCONNECT_PERIOD.SIM_FRAME,
-
 
185
                SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
-
 
186
                0, 0, 0);
-
 
187
        }
-
 
188
 
147
        // Individual data requests
189
        // Individual data requests
148
        public void requestNavComm1Data() {
190
        public void requestNavComm1Data() {
149
            this.requestData(FSXObject.DATA_REQUESTS.NAVCOM1_REQ, FSXObject.DEFINITIONS.NAVCOM1_DATA);
191
            this.requestData(FSXObject.DATA_REQUESTS.NAVCOM1_REQ, FSXObject.DEFINITIONS.NAVCOM1_DATA);
150
        }
192
        }
151
 
193