|
@@ -104,42 +104,45 @@ namespace RF_TRIO_PLL_ZIG
|
104
|
104
|
this.pictureBox_R_RX.Visible = true;
|
105
|
105
|
this.pictureBox_G_RX.Visible = false;
|
106
|
106
|
}
|
107
|
|
-
|
|
107
|
+ Int64 TimerCnt = 0;
|
108
|
108
|
private void timer_Tick(object sender, EventArgs e)
|
109
|
109
|
{
|
110
|
|
-
|
111
|
|
- if (this.pictureBox_G_TX.Visible == true)
|
112
|
|
- {
|
113
|
|
- TX_Light_OFF();
|
114
|
|
- }
|
115
|
|
- if (this.pictureBox_G_RX.Visible == true)
|
|
110
|
+ TimerCnt++;
|
|
111
|
+ if (TimerCnt > 500)
|
116
|
112
|
{
|
117
|
|
- RX_Light_OFF();
|
|
113
|
+ if (this.pictureBox_G_TX.Visible == true)
|
|
114
|
+ {
|
|
115
|
+ TX_Light_OFF();
|
|
116
|
+ }
|
|
117
|
+ if (this.pictureBox_G_RX.Visible == true)
|
|
118
|
+ {
|
|
119
|
+ RX_Light_OFF();
|
|
120
|
+ }
|
118
|
121
|
}
|
119
|
122
|
}
|
120
|
123
|
private void Main_Form_Load(object sender, EventArgs e)
|
121
|
124
|
{
|
122
|
|
- pictureBox_PATH_1_8G_DL_ON.Visible = !false;
|
123
|
|
- pictureBox_PATH_1_8G_UL_ON.Visible = !false;
|
124
|
|
- pictureBox_PATH_2_1G_DL_ON.Visible = !false;
|
125
|
|
- pictureBox_PATH_2_1G_UL_ON.Visible = !false;
|
126
|
|
- pictureBox_PATH_3_5G_L_ON.Visible = !false;
|
127
|
|
- pictureBox_PATH_3_5G_H_ON.Visible = !false;
|
128
|
|
- pictureBox_PLL_ON_OFF_3_5G_L_ON.Visible = !false;
|
129
|
|
- pictureBox_PLL_ON_OFF_3_5G_H_ON.Visible = !false;
|
130
|
|
- pictureBox_PATH_3_5G_UL_ON.Visible = !false;
|
131
|
|
- pictureBox_PATH_3_5G_DL_ON.Visible = !false;
|
132
|
|
-
|
133
|
|
- pictureBox_PATH_1_8G_DL_OFF.Visible = false;
|
134
|
|
- pictureBox_PATH_1_8G_UL_OFF.Visible = false;
|
135
|
|
- pictureBox_PATH_2_1G_DL_OFF.Visible = false;
|
136
|
|
- pictureBox_PATH_2_1G_UL_OFF.Visible = false;
|
137
|
|
- pictureBox_PATH_3_5G_L_OFF.Visible = false;
|
138
|
|
- pictureBox_PATH_3_5G_H_OFF.Visible = false;
|
139
|
|
- pictureBox_PLL_ON_OFF_3_5G_L_OFF.Visible = false;
|
140
|
|
- pictureBox_PLL_ON_OFF_3_5G_H_OFF.Visible = false;
|
141
|
|
- pictureBox_PATH_3_5G_UL_OFF.Visible = false;
|
142
|
|
- pictureBox_PATH_3_5G_DL_OFF.Visible = false;
|
|
125
|
+ pictureBox_PATH_1_8G_DL_ON.Visible = false;
|
|
126
|
+ pictureBox_PATH_1_8G_UL_ON.Visible = false;
|
|
127
|
+ pictureBox_PATH_2_1G_DL_ON.Visible = false;
|
|
128
|
+ pictureBox_PATH_2_1G_UL_ON.Visible = false;
|
|
129
|
+ pictureBox_PATH_3_5G_L_ON.Visible = false;
|
|
130
|
+ pictureBox_PATH_3_5G_H_ON.Visible = false;
|
|
131
|
+ pictureBox_PLL_ON_OFF_3_5G_L_ON.Visible = false;
|
|
132
|
+ pictureBox_PLL_ON_OFF_3_5G_H_ON.Visible = false;
|
|
133
|
+ pictureBox_PATH_3_5G_UL_ON.Visible = false;
|
|
134
|
+ pictureBox_PATH_3_5G_DL_ON.Visible = false;
|
|
135
|
+
|
|
136
|
+ pictureBox_PATH_1_8G_DL_OFF.Visible = !false;
|
|
137
|
+ pictureBox_PATH_1_8G_UL_OFF.Visible = !false;
|
|
138
|
+ pictureBox_PATH_2_1G_DL_OFF.Visible = !false;
|
|
139
|
+ pictureBox_PATH_2_1G_UL_OFF.Visible = !false;
|
|
140
|
+ pictureBox_PATH_3_5G_L_OFF.Visible = !false;
|
|
141
|
+ pictureBox_PATH_3_5G_H_OFF.Visible = !false;
|
|
142
|
+ pictureBox_PLL_ON_OFF_3_5G_L_OFF.Visible = !false;
|
|
143
|
+ pictureBox_PLL_ON_OFF_3_5G_H_OFF.Visible = !false;
|
|
144
|
+ pictureBox_PATH_3_5G_UL_OFF.Visible = !false;
|
|
145
|
+ pictureBox_PATH_3_5G_DL_OFF.Visible = !false;
|
143
|
146
|
|
144
|
147
|
pictureBox_G_RX.Visible = !false;
|
145
|
148
|
pictureBox_G_TX.Visible = !false;
|
|
@@ -280,64 +283,198 @@ namespace RF_TRIO_PLL_ZIG
|
280
|
283
|
ret = bluecell_BootProtocol.Bluecell_ReversePE43711_Calc(temp_val);
|
281
|
284
|
this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_COM3, ret.ToString());
|
282
|
285
|
|
283
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_H] << 8 | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_L];
|
|
286
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_H] << 8;
|
|
287
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_L]) / 10);
|
284
|
288
|
this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_1_8G_DL, temp_val.ToString());
|
285
|
289
|
|
286
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_H] << 8 | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_L];
|
|
290
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_H] << 8;
|
|
291
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_L]) / 10);
|
287
|
292
|
this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_1_8G_UL, temp_val.ToString());
|
288
|
293
|
|
289
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_H] << 8 | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_L];
|
|
294
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_H] << 8;
|
|
295
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_L]) / 10);
|
290
|
296
|
this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_2_1G_DL, temp_val.ToString());
|
291
|
297
|
|
292
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_H] << 8 | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_L];
|
|
298
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_H] << 8;
|
|
299
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_L]) / 10);
|
293
|
300
|
this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_2_1G_UL, temp_val.ToString());
|
294
|
301
|
|
295
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_H] << 8 | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_L];
|
|
302
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_H] << 8;
|
|
303
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_L]) / 10);
|
296
|
304
|
this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_DL, temp_val.ToString());
|
297
|
305
|
|
298
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] << 8 | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L];
|
|
306
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] << 8;
|
|
307
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L]) / 10);
|
299
|
308
|
this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_UL, temp_val.ToString());
|
300
|
309
|
|
301
|
|
-/* temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_H] << 8 | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_L];
|
302
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
303
|
|
-
|
304
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
305
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
306
|
|
-
|
307
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
308
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
309
|
|
-
|
310
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
311
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
312
|
|
-
|
313
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
314
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
315
|
|
-
|
316
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
317
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
318
|
|
-
|
319
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
320
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
321
|
|
-
|
322
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
323
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
324
|
|
-
|
325
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
326
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
327
|
|
-
|
328
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
329
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
330
|
|
-
|
331
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
332
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
333
|
|
-
|
334
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
335
|
|
- this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, temp_val.ToString());
|
336
|
|
-
|
337
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
338
|
|
- */
|
339
|
|
-
|
340
|
|
- temp_val = data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL1];
|
|
310
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_H] << 8;
|
|
311
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_L]) );
|
|
312
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
313
|
+ ret = ret / 4095;
|
|
314
|
+ ret = Math.Round(Convert.ToDouble(ret), 1);
|
|
315
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_A, ret.ToString());
|
|
316
|
+
|
|
317
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_H] << 8;
|
|
318
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_L]) );
|
|
319
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
320
|
+ ret = ret / 4095;
|
|
321
|
+ ret = Math.Round(Convert.ToDouble(ret), 1);
|
|
322
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_B, ret.ToString());
|
|
323
|
+
|
|
324
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_H] << 8;
|
|
325
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_L]) );
|
|
326
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
327
|
+ ret = ret / 4095;
|
|
328
|
+ ret = Math.Round(Convert.ToDouble(ret ), 1);
|
|
329
|
+
|
|
330
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_C, ret.ToString());
|
|
331
|
+
|
|
332
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_H] << 8;
|
|
333
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_L]) );
|
|
334
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
335
|
+ ret = ret / 4095;
|
|
336
|
+ ret = Math.Round(Convert.ToDouble(ret), 1);
|
|
337
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_D, ret.ToString());
|
|
338
|
+
|
|
339
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_H] << 8;
|
|
340
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_L]) );
|
|
341
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
342
|
+ ret = ret / 4095;
|
|
343
|
+ ret = Math.Round(Convert.ToDouble(ret), 1);
|
|
344
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_E, ret.ToString());
|
|
345
|
+
|
|
346
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_H] << 8;
|
|
347
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_L]) );
|
|
348
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
349
|
+ ret = ret / 4095;
|
|
350
|
+ ret = Math.Round(Convert.ToDouble(ret), 1);
|
|
351
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_F, ret.ToString());
|
|
352
|
+
|
|
353
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_H] << 8;
|
|
354
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_L]) );
|
|
355
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
356
|
+ ret = ret / 4095;
|
|
357
|
+ ret = Math.Round(Convert.ToDouble(ret), 1);
|
|
358
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_G, ret.ToString());
|
|
359
|
+
|
|
360
|
+ temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_H] << 8;
|
|
361
|
+ temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_L]) );
|
|
362
|
+ ret = (temp_val & 0x0FFF) * 4;
|
|
363
|
+ ret = ret / 4095;
|
|
364
|
+ ret = Math.Round(Convert.ToDouble(ret), 1);
|
|
365
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_H, ret.ToString());
|
|
366
|
+
|
|
367
|
+ PictureBox pic_on;
|
|
368
|
+ PictureBox pic_off;
|
|
369
|
+ pic_on = pictureBox_PATH_1_8G_DL_ON;
|
|
370
|
+ pic_off = pictureBox_PATH_1_8G_DL_OFF;
|
|
371
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_1_8G_DL] > 0)
|
|
372
|
+ {
|
|
373
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
374
|
+ }
|
|
375
|
+ else
|
|
376
|
+ {
|
|
377
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
378
|
+ }
|
|
379
|
+
|
|
380
|
+ pic_on = pictureBox_PATH_1_8G_UL_ON;
|
|
381
|
+ pic_off = pictureBox_PATH_1_8G_UL_OFF;
|
|
382
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_1_8G_UL] > 0)
|
|
383
|
+ {
|
|
384
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
385
|
+ }
|
|
386
|
+ else
|
|
387
|
+ {
|
|
388
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
389
|
+ }
|
|
390
|
+
|
|
391
|
+ pic_on = pictureBox_PATH_2_1G_DL_ON;
|
|
392
|
+ pic_off = pictureBox_PATH_2_1G_DL_OFF;
|
|
393
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_2_1G_DL] > 0)
|
|
394
|
+ {
|
|
395
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
396
|
+ }
|
|
397
|
+ else
|
|
398
|
+ {
|
|
399
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
400
|
+ }
|
|
401
|
+
|
|
402
|
+ pic_on = pictureBox_PATH_2_1G_UL_ON;
|
|
403
|
+ pic_off = pictureBox_PATH_2_1G_UL_OFF;
|
|
404
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_2_1G_UL] > 0)
|
|
405
|
+ {
|
|
406
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
407
|
+ }
|
|
408
|
+ else
|
|
409
|
+ {
|
|
410
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
411
|
+ }
|
|
412
|
+
|
|
413
|
+ pic_on = pictureBox_PATH_3_5G_DL_ON;
|
|
414
|
+ pic_off = pictureBox_PATH_3_5G_DL_OFF;
|
|
415
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_3_5G_DL] > 0)
|
|
416
|
+ {
|
|
417
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
418
|
+ }
|
|
419
|
+ else
|
|
420
|
+ {
|
|
421
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
422
|
+ }
|
|
423
|
+
|
|
424
|
+ pic_on = pictureBox_PATH_3_5G_UL_ON;
|
|
425
|
+ pic_off = pictureBox_PATH_3_5G_UL_OFF;
|
|
426
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_3_5G_UL] > 0)
|
|
427
|
+ {
|
|
428
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
429
|
+ }
|
|
430
|
+ else
|
|
431
|
+ {
|
|
432
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
433
|
+ }
|
|
434
|
+
|
|
435
|
+ pic_on = pictureBox_PATH_3_5G_H_ON;
|
|
436
|
+ pic_off = pictureBox_PATH_3_5G_H_OFF;
|
|
437
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_3_5G_H] > 0)
|
|
438
|
+ {
|
|
439
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
440
|
+ }
|
|
441
|
+ else
|
|
442
|
+ {
|
|
443
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
444
|
+ }
|
|
445
|
+
|
|
446
|
+ pic_on = pictureBox_PATH_3_5G_L_ON;
|
|
447
|
+ pic_off = pictureBox_PATH_3_5G_L_OFF;
|
|
448
|
+ if (data[(int)Bluecell_TypeIndex_t.PATH_EN_3_5G_L] > 0)
|
|
449
|
+ {
|
|
450
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
451
|
+ }
|
|
452
|
+ else
|
|
453
|
+ {
|
|
454
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
455
|
+ }
|
|
456
|
+
|
|
457
|
+ pic_on = pictureBox_PLL_ON_OFF_3_5G_H_ON;
|
|
458
|
+ pic_off = pictureBox_PLL_ON_OFF_3_5G_H_OFF;
|
|
459
|
+ if (data[(int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_H] > 0)
|
|
460
|
+ {
|
|
461
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
462
|
+ }
|
|
463
|
+ else
|
|
464
|
+ {
|
|
465
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
466
|
+ }
|
|
467
|
+
|
|
468
|
+ pic_on = pictureBox_PLL_ON_OFF_3_5G_L_ON;
|
|
469
|
+ pic_off = pictureBox_PLL_ON_OFF_3_5G_L_OFF;
|
|
470
|
+ if (data[(int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_L] > 0)
|
|
471
|
+ {
|
|
472
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, true);
|
|
473
|
+ }
|
|
474
|
+ else
|
|
475
|
+ {
|
|
476
|
+ this.Invoke(new PictureBoxSend(PictureBox_On_OFF_Set), pic_on, pic_off, false);
|
|
477
|
+ }
|
341
|
478
|
// this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL2, data[(int)Bluecell_TypeIndex_t.ATT_1_8G_DL2]);
|
342
|
479
|
|
343
|
480
|
}
|
|
@@ -346,6 +483,15 @@ namespace RF_TRIO_PLL_ZIG
|
346
|
483
|
|
347
|
484
|
catch { /*MessageBox.Show("What is this?");*/ }
|
348
|
485
|
}
|
|
486
|
+ private delegate void PictureBoxSend(object picon, object picoff, bool set);
|
|
487
|
+ private void PictureBox_On_OFF_Set(object pic_on,object pic_off,bool set)
|
|
488
|
+ {
|
|
489
|
+
|
|
490
|
+ PictureBox picture_on = (PictureBox)pic_on;
|
|
491
|
+ PictureBox picture_off = (PictureBox)pic_off;
|
|
492
|
+ picture_on.Visible = set;
|
|
493
|
+ picture_off.Visible =!set;
|
|
494
|
+ }
|
349
|
495
|
public void ReSetting_Values(byte[] temp_buf)
|
350
|
496
|
{
|
351
|
497
|
this.numericUpDown_ATT_1_8G_DL1.Text = temp_buf[(byte)Bluecell_TypeIndex_t.ATT_1_8G_DL1].ToString();
|
|
@@ -498,7 +644,25 @@ namespace RF_TRIO_PLL_ZIG
|
498
|
644
|
|
499
|
645
|
private void button1_Click(object sender, EventArgs e)
|
500
|
646
|
{
|
501
|
|
- Crc16 crc16 = new Crc16();
|
|
647
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL1, "0.0");
|
|
648
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_DL2, "0.0");
|
|
649
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_UL1, "0.0");
|
|
650
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_UL2, "0.0");
|
|
651
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_UL3, "0.0");
|
|
652
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_1_8G_UL4, "0.0");
|
|
653
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_2_1G_DL1, "0.0");
|
|
654
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_2_1G_DL2, "0.0");
|
|
655
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_2_1G_UL1, "0.0");
|
|
656
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_2_1G_UL2, "0.0");
|
|
657
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_2_1G_UL3, "0.0");
|
|
658
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_2_1G_UL4, "0.0");
|
|
659
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_DL, "0.0");
|
|
660
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_UL, "0.0");
|
|
661
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_COM1, "0.0");
|
|
662
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_COM2, "0.0");
|
|
663
|
+ this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_COM3, "0.0");
|
|
664
|
+ Button_Set_Click(sender, e);
|
|
665
|
+ /*Crc16 crc16 = new Crc16();
|
502
|
666
|
byte[] temp_buf = new byte[6];
|
503
|
667
|
temp_buf[0] = 0xbe;
|
504
|
668
|
temp_buf[1] = 2;
|
|
@@ -506,7 +670,8 @@ namespace RF_TRIO_PLL_ZIG
|
506
|
670
|
temp_buf[3] = 5;
|
507
|
671
|
temp_buf[4] = crc16.STH30_CreateCrc(temp_buf, temp_buf[2]);
|
508
|
672
|
temp_buf[5] = 0xeb;
|
509
|
|
- serial.Serial_DataSend(temp_buf, temp_buf[2] + 2);
|
|
673
|
+ serial.Serial_DataSend(temp_buf, temp_buf[2] + 2);*/
|
|
674
|
+
|
510
|
675
|
}
|
511
|
676
|
|
512
|
677
|
|
|
@@ -536,6 +701,19 @@ namespace RF_TRIO_PLL_ZIG
|
536
|
701
|
GroupBox grp = (GroupBox)sender;
|
537
|
702
|
grp.Focus();
|
538
|
703
|
}
|
539
|
|
-
|
|
704
|
+
|
|
705
|
+ private void button_Save_Click(object sender, EventArgs e)
|
|
706
|
+ {
|
|
707
|
+ Crc16 crc16 = new Crc16();
|
|
708
|
+ byte[] temp_buf = new byte[6];
|
|
709
|
+
|
|
710
|
+ temp_buf[0] = 0xbe;
|
|
711
|
+ temp_buf[1] = 3;
|
|
712
|
+ temp_buf[2] = 3;
|
|
713
|
+ temp_buf[3] = 4;
|
|
714
|
+ temp_buf[4] = crc16.STH30_CreateCrc(temp_buf, temp_buf[2]);
|
|
715
|
+ temp_buf[5] = 0xeb;
|
|
716
|
+ serial.Serial_DataSend(temp_buf, temp_buf[2] + 3);
|
|
717
|
+ }
|
540
|
718
|
}
|
541
|
719
|
}
|