-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSats.frm
349 lines (322 loc) · 11.1 KB
/
Sats.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
VERSION 5.00
Begin VB.Form frmSats
Caption = "Satellite Data ( for NFW)"
ClientHeight = 3718
ClientLeft = 65
ClientTop = 351
ClientWidth = 4147
LinkTopic = "Form1"
ScaleHeight = 3718
ScaleWidth = 4147
StartUpPosition = 3 'Windows Default
Begin VB.CheckBox Sat2Dnlink
Caption = "Uplink channel is second dnlink."
Height = 364
Left = 2340
TabIndex = 19
ToolTipText = "Check this to have both channes doppler corrected for downlink."
Top = 1287
Width = 1534
End
Begin VB.CheckBox SatDirTrack
Caption = "Direct Track"
Height = 255
Left = 2340
TabIndex = 17
Top = 936
Width = 1183
End
Begin VB.CheckBox SatRevTrack
Caption = "Reverse Track"
Height = 255
Left = 2340
TabIndex = 16
Top = 585
Width = 1183
End
Begin VB.CheckBox SatSatEnabled
Caption = "Enable this Satellite"
Height = 375
Left = 2340
TabIndex = 15
Top = 182
Width = 1155
End
Begin VB.TextBox SatName
Height = 285
Left = 240
TabIndex = 13
ToolTipText = "Satellite name as in Nova's database."
Top = 1080
Width = 1575
End
Begin VB.CommandButton SatDeleteLast
Caption = "Delete least Satellite"
Height = 495
Left = 2760
TabIndex = 12
ToolTipText = "WARNING!. Deletes the highest index satellte."
Top = 3055
Width = 975
End
Begin VB.CommandButton SatClose
Caption = "Close"
Height = 495
Left = 1560
TabIndex = 11
ToolTipText = "Close this window."
Top = 3055
Width = 975
End
Begin VB.CommandButton SatSave
Caption = "Save"
Height = 495
Left = 360
TabIndex = 10
ToolTipText = "Save settings to Windows registry."
Top = 3055
Width = 975
End
Begin VB.TextBox SatDownlinkMode
Height = 285
Left = 2280
TabIndex = 7
ToolTipText = "RX downlink modulation mode."
Top = 2574
Width = 1095
End
Begin VB.TextBox SatUplinkMode
Height = 285
Left = 240
TabIndex = 6
ToolTipText = "TX uplink modulation mode."
Top = 2574
Width = 1095
End
Begin VB.TextBox SatDownlinkFreq
Height = 285
Left = 2280
TabIndex = 4
ToolTipText = "Downlink frequency of the satellite."
Top = 1911
Width = 1575
End
Begin VB.TextBox SatUplinkFreq
Height = 285
Left = 240
TabIndex = 1
ToolTipText = "Uplink frequency of the satellite."
Top = 1911
Width = 1575
End
Begin VB.ComboBox SatIndex
Height = 315
Left = 240
TabIndex = 0
ToolTipText = "Index number of the satelite to edit, or pick the last number to add a new satellite."
Top = 360
Width = 1575
End
Begin VB.Label Label7
Caption = "Direct Track"
Height = 260
Left = 2574
TabIndex = 18
Top = 1027
Width = 1092
End
Begin VB.Label Label8
Caption = "Name:"
Height = 255
Left = 240
TabIndex = 14
Top = 840
Width = 1575
End
Begin VB.Label Label5
Caption = "Downlink mode:"
Height = 260
Left = 2275
TabIndex = 9
Top = 2340
Width = 1573
End
Begin VB.Label Label4
Caption = "Uplink mode:"
Height = 260
Left = 234
TabIndex = 8
Top = 2340
Width = 1092
End
Begin VB.Label Label3
Caption = "Downlink freq.:"
Height = 260
Left = 2275
TabIndex = 5
Top = 1677
Width = 1573
End
Begin VB.Label Label2
Caption = "Satellite Index:"
Height = 255
Left = 240
TabIndex = 3
Top = 120
Width = 1575
End
Begin VB.Label Label1
Caption = "Uplink freq.:"
Height = 260
Left = 234
TabIndex = 2
Top = 1677
Width = 1573
End
End
Attribute VB_Name = "frmSats"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
'Add as many entries to the "sat Index" combo as we find
'in the registry...
SatIndex.Clear
i% = 0
Do
i% = i% + 1
SatIndex.AddItem LTrim$(Str$(i%))
Loop Until GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(Str$(i%)), "SatName", "-") = "-"
SatName.text = ""
SatUplinkFreq.text = ""
SatDownlinkFreq.text = ""
SatUplinkMode.text = ""
SatDownlinkMode.text = ""
SatDirTrack.Value = 0
SatRevTrack.Value = 0
Call SatSatEnabled_Click
End Sub
Private Sub SatClose_Click()
frmSats.Hide
End Sub
Private Sub SatDeleteLast_Click()
'remove last SatN folder from registry:
'Add as many entries to the "sat Index" combo as we find
'in the registry...
SatIndex.Clear
i% = 0
Do
i% = i% + 1
SatIndex.AddItem LTrim$(Str$(i%))
Loop Until (GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(Str$(i%)), "SatName", "-") = "-")
If i% > 1 Then
DeleteSetting "WiSP_DDE_Client", "Sat" + LTrim(Str(i% - 1))
End If
'update the index combo as we may have more sats now!
'Add as many entries to the "sat Index" combo as we find
'in the registry...
a% = SatIndex.ListIndex
SatIndex.Clear
i% = 0
Do
i% = i% + 1
SatIndex.AddItem LTrim$(Str$(i%))
Loop Until (GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(Str$(i%)), "SatName", "-") = "-")
SatIndex.ListIndex = a%
If a% >= SatIndex.ListCount Then
SatIndex.ListIndex = SatIndex.ListCount - 1
Else
SatIndex.ListIndex = a%
End If
Call SatIndex_Change
End Sub
Private Sub SatDirTrack_Click()
If SatDirTrack.Value = 1 Then
SatRevTrack.Value = 0
End If
End Sub
Private Sub SatIndex_Change()
'update settings for selected satellite
'Retrieve configuration for selected sat:
SatName.text = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatName", "")
SatUplinkFreq.text = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatUplinkFreq", "")
SatDownlinkFreq.text = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatDownlinkFreq", "")
SatUplinkMode.text = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatUplinkMode", "")
SatDownlinkMode.text = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatDownlinkMode", "")
SatDirTrack.Value = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatDirTrack", 0)
SatRevTrack.Value = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatRevTrack", 0)
SatSatEnabled.Value = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "SatSatEnabled", 0)
Sat2Dnlink.Value = GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(SatIndex.text), "Sat2Dnlink", 0)
End Sub
Private Sub SatIndex_Click()
Call SatIndex_Change
End Sub
Private Sub SatRevTrack_Click()
If SatRevTrack.Value = 1 Then
SatDirTrack.Value = 0
End If
End Sub
Private Sub SatSatEnabled_Click()
If SatIndex.text = "" Then
SatSatEnabled.Value = 0
End If
If SatSatEnabled.Value Then
SatName.Enabled = True
SatUplinkFreq.Enabled = True
SatDownlinkFreq.Enabled = True
SatUplinkMode.Enabled = True
SatDownlinkMode.Enabled = True
SatDirTrack.Enabled = True
SatRevTrack.Enabled = True
Sat2Dnlink.Enabled = True
Label1.Enabled = True
Label2.Enabled = True
Label3.Enabled = True
Label4.Enabled = True
Label5.Enabled = True
Label7.Enabled = True
Label8.Enabled = True
Else
SatName.Enabled = False
SatUplinkFreq.Enabled = False
SatDownlinkFreq.Enabled = False
SatUplinkMode.Enabled = False
SatDownlinkMode.Enabled = False
SatDirTrack.Enabled = False
SatRevTrack.Enabled = False
Sat2Dnlink.Enabled = False
Label1.Enabled = False
Label2.Enabled = False
Label3.Enabled = False
Label4.Enabled = False
Label5.Enabled = False
Label7.Enabled = False
Label8.Enabled = False
End If
End Sub
Private Sub SatSave_Click()
If SatIndex.text <> "" Then
'Save settings to windows registry...
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatName", SatName.text
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatDownlinkFreq", SatDownlinkFreq.text
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatDownlinkMOde", SatDownlinkMode.text
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatUplinkFreq", SatUplinkFreq.text
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatUplinkMode", SatUplinkMode.text
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatSatEnabled", SatSatEnabled.Value
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatDirTrack", SatDirTrack.Value
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "SatRevTrack", SatRevTrack.Value
SaveSetting "WiSP_DDE_Client", "Sat" + SatIndex.text, "Sat2Dnlink", Sat2Dnlink.Value
'update the index combo as we may have more sats now!
'Add as many entries to the "sat Index" combo as we find
'in the registry...
a% = SatIndex.ListIndex
SatIndex.Clear
i% = 0
Do
i% = i% + 1
SatIndex.AddItem LTrim$(Str$(i%))
Loop Until (GetSetting("WiSP_DDE_Client", "Sat" + LTrim$(Str$(i%)), "SatName", "-") = "-")
SatIndex.ListIndex = a%
End If
End Sub