YJ пре 6 година
родитељ
комит
9a81036988

+ 4 - 1
Basic_Terminal/Func/Bluecell_BootProtocol.cs

@@ -41,6 +41,7 @@ namespace RF_TRIO_PLL_ZIG
41
         TYPE_BLUECELL_GET   = 2,
41
         TYPE_BLUECELL_GET   = 2,
42
         TYPE_BLUECELL_SAVE  = 3,
42
         TYPE_BLUECELL_SAVE  = 3,
43
         TYPE_BLUECELL_ACK   = 4,
43
         TYPE_BLUECELL_ACK   = 4,
44
+        TYPE_BLUECELL_ERROR = 5,
44
     };
45
     };
45
     enum Bluecell_TypeIndex_t
46
     enum Bluecell_TypeIndex_t
46
     {
47
     {
@@ -555,7 +556,9 @@ namespace RF_TRIO_PLL_ZIG
555
                 case (byte)Bluecell_Prot_t.TYPE_BLUECELL_ACK:
556
                 case (byte)Bluecell_Prot_t.TYPE_BLUECELL_ACK:
556
                     this.main_Form.Message_Box_Open();
557
                     this.main_Form.Message_Box_Open();
557
                     break;
558
                     break;
558
-
559
+                case (byte)Bluecell_Prot_t.TYPE_BLUECELL_ERROR:
560
+                    this.main_Form.Message_Box_Error_Open(temp_buf);
561
+                    break;
559
 
562
 
560
             }
563
             }
561
             //Debug.Invoke(new StringSend(Debug.Data_Recv_Str), data);
564
             //Debug.Invoke(new StringSend(Debug.Data_Recv_Str), data);

+ 46 - 4
Basic_Terminal/Wnd/Main_Form.Designer.cs

@@ -1407,6 +1407,7 @@
1407
             // numericUpDown_PLL_3_5G_UL
1407
             // numericUpDown_PLL_3_5G_UL
1408
             // 
1408
             // 
1409
             this.numericUpDown_PLL_3_5G_UL.DecimalPlaces = 1;
1409
             this.numericUpDown_PLL_3_5G_UL.DecimalPlaces = 1;
1410
+            this.numericUpDown_PLL_3_5G_UL.Enabled = false;
1410
             this.numericUpDown_PLL_3_5G_UL.Increment = new decimal(new int[] {
1411
             this.numericUpDown_PLL_3_5G_UL.Increment = new decimal(new int[] {
1411
             1,
1412
             1,
1412
             0,
1413
             0,
@@ -1428,6 +1429,7 @@
1428
             // numericUpDown_PLL_3_5G_DL
1429
             // numericUpDown_PLL_3_5G_DL
1429
             // 
1430
             // 
1430
             this.numericUpDown_PLL_3_5G_DL.DecimalPlaces = 1;
1431
             this.numericUpDown_PLL_3_5G_DL.DecimalPlaces = 1;
1432
+            this.numericUpDown_PLL_3_5G_DL.Enabled = false;
1431
             this.numericUpDown_PLL_3_5G_DL.Increment = new decimal(new int[] {
1433
             this.numericUpDown_PLL_3_5G_DL.Increment = new decimal(new int[] {
1432
             1,
1434
             1,
1433
             0,
1435
             0,
@@ -1488,13 +1490,23 @@
1488
             65536});
1490
             65536});
1489
             this.numericUpDown_PLL_2_1G_UL.Location = new System.Drawing.Point(132, 47);
1491
             this.numericUpDown_PLL_2_1G_UL.Location = new System.Drawing.Point(132, 47);
1490
             this.numericUpDown_PLL_2_1G_UL.Maximum = new decimal(new int[] {
1492
             this.numericUpDown_PLL_2_1G_UL.Maximum = new decimal(new int[] {
1491
-            3000,
1493
+            1980,
1494
+            0,
1495
+            0,
1496
+            0});
1497
+            this.numericUpDown_PLL_2_1G_UL.Minimum = new decimal(new int[] {
1498
+            1980,
1492
             0,
1499
             0,
1493
             0,
1500
             0,
1494
             0});
1501
             0});
1495
             this.numericUpDown_PLL_2_1G_UL.Name = "numericUpDown_PLL_2_1G_UL";
1502
             this.numericUpDown_PLL_2_1G_UL.Name = "numericUpDown_PLL_2_1G_UL";
1496
             this.numericUpDown_PLL_2_1G_UL.Size = new System.Drawing.Size(71, 21);
1503
             this.numericUpDown_PLL_2_1G_UL.Size = new System.Drawing.Size(71, 21);
1497
             this.numericUpDown_PLL_2_1G_UL.TabIndex = 1;
1504
             this.numericUpDown_PLL_2_1G_UL.TabIndex = 1;
1505
+            this.numericUpDown_PLL_2_1G_UL.Value = new decimal(new int[] {
1506
+            1980,
1507
+            0,
1508
+            0,
1509
+            0});
1498
             this.numericUpDown_PLL_2_1G_UL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1510
             this.numericUpDown_PLL_2_1G_UL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1499
             this.numericUpDown_PLL_2_1G_UL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1511
             this.numericUpDown_PLL_2_1G_UL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1500
             this.numericUpDown_PLL_2_1G_UL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);
1512
             this.numericUpDown_PLL_2_1G_UL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);
@@ -1509,13 +1521,23 @@
1509
             65536});
1521
             65536});
1510
             this.numericUpDown_PLL_2_1G_DL.Location = new System.Drawing.Point(132, 19);
1522
             this.numericUpDown_PLL_2_1G_DL.Location = new System.Drawing.Point(132, 19);
1511
             this.numericUpDown_PLL_2_1G_DL.Maximum = new decimal(new int[] {
1523
             this.numericUpDown_PLL_2_1G_DL.Maximum = new decimal(new int[] {
1512
-            3000,
1524
+            2170,
1525
+            0,
1526
+            0,
1527
+            0});
1528
+            this.numericUpDown_PLL_2_1G_DL.Minimum = new decimal(new int[] {
1529
+            2170,
1513
             0,
1530
             0,
1514
             0,
1531
             0,
1515
             0});
1532
             0});
1516
             this.numericUpDown_PLL_2_1G_DL.Name = "numericUpDown_PLL_2_1G_DL";
1533
             this.numericUpDown_PLL_2_1G_DL.Name = "numericUpDown_PLL_2_1G_DL";
1517
             this.numericUpDown_PLL_2_1G_DL.Size = new System.Drawing.Size(71, 21);
1534
             this.numericUpDown_PLL_2_1G_DL.Size = new System.Drawing.Size(71, 21);
1518
             this.numericUpDown_PLL_2_1G_DL.TabIndex = 1;
1535
             this.numericUpDown_PLL_2_1G_DL.TabIndex = 1;
1536
+            this.numericUpDown_PLL_2_1G_DL.Value = new decimal(new int[] {
1537
+            2170,
1538
+            0,
1539
+            0,
1540
+            0});
1519
             this.numericUpDown_PLL_2_1G_DL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1541
             this.numericUpDown_PLL_2_1G_DL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1520
             this.numericUpDown_PLL_2_1G_DL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1542
             this.numericUpDown_PLL_2_1G_DL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1521
             this.numericUpDown_PLL_2_1G_DL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);
1543
             this.numericUpDown_PLL_2_1G_DL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);
@@ -1562,13 +1584,23 @@
1562
             65536});
1584
             65536});
1563
             this.numericUpDown_PLL_1_8G_UL.Location = new System.Drawing.Point(132, 47);
1585
             this.numericUpDown_PLL_1_8G_UL.Location = new System.Drawing.Point(132, 47);
1564
             this.numericUpDown_PLL_1_8G_UL.Maximum = new decimal(new int[] {
1586
             this.numericUpDown_PLL_1_8G_UL.Maximum = new decimal(new int[] {
1565
-            3000,
1587
+            1785,
1588
+            0,
1589
+            0,
1590
+            0});
1591
+            this.numericUpDown_PLL_1_8G_UL.Minimum = new decimal(new int[] {
1592
+            1785,
1566
             0,
1593
             0,
1567
             0,
1594
             0,
1568
             0});
1595
             0});
1569
             this.numericUpDown_PLL_1_8G_UL.Name = "numericUpDown_PLL_1_8G_UL";
1596
             this.numericUpDown_PLL_1_8G_UL.Name = "numericUpDown_PLL_1_8G_UL";
1570
             this.numericUpDown_PLL_1_8G_UL.Size = new System.Drawing.Size(71, 21);
1597
             this.numericUpDown_PLL_1_8G_UL.Size = new System.Drawing.Size(71, 21);
1571
             this.numericUpDown_PLL_1_8G_UL.TabIndex = 1;
1598
             this.numericUpDown_PLL_1_8G_UL.TabIndex = 1;
1599
+            this.numericUpDown_PLL_1_8G_UL.Value = new decimal(new int[] {
1600
+            1785,
1601
+            0,
1602
+            0,
1603
+            0});
1572
             this.numericUpDown_PLL_1_8G_UL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1604
             this.numericUpDown_PLL_1_8G_UL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1573
             this.numericUpDown_PLL_1_8G_UL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1605
             this.numericUpDown_PLL_1_8G_UL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1574
             this.numericUpDown_PLL_1_8G_UL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);
1606
             this.numericUpDown_PLL_1_8G_UL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);
@@ -1583,13 +1615,23 @@
1583
             65536});
1615
             65536});
1584
             this.numericUpDown_PLL_1_8G_DL.Location = new System.Drawing.Point(132, 19);
1616
             this.numericUpDown_PLL_1_8G_DL.Location = new System.Drawing.Point(132, 19);
1585
             this.numericUpDown_PLL_1_8G_DL.Maximum = new decimal(new int[] {
1617
             this.numericUpDown_PLL_1_8G_DL.Maximum = new decimal(new int[] {
1586
-            3000,
1618
+            1880,
1619
+            0,
1620
+            0,
1621
+            0});
1622
+            this.numericUpDown_PLL_1_8G_DL.Minimum = new decimal(new int[] {
1623
+            1805,
1587
             0,
1624
             0,
1588
             0,
1625
             0,
1589
             0});
1626
             0});
1590
             this.numericUpDown_PLL_1_8G_DL.Name = "numericUpDown_PLL_1_8G_DL";
1627
             this.numericUpDown_PLL_1_8G_DL.Name = "numericUpDown_PLL_1_8G_DL";
1591
             this.numericUpDown_PLL_1_8G_DL.Size = new System.Drawing.Size(71, 21);
1628
             this.numericUpDown_PLL_1_8G_DL.Size = new System.Drawing.Size(71, 21);
1592
             this.numericUpDown_PLL_1_8G_DL.TabIndex = 1;
1629
             this.numericUpDown_PLL_1_8G_DL.TabIndex = 1;
1630
+            this.numericUpDown_PLL_1_8G_DL.Value = new decimal(new int[] {
1631
+            1805,
1632
+            0,
1633
+            0,
1634
+            0});
1593
             this.numericUpDown_PLL_1_8G_DL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1635
             this.numericUpDown_PLL_1_8G_DL.Enter += new System.EventHandler(this.Activi_Change__Setting);
1594
             this.numericUpDown_PLL_1_8G_DL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1636
             this.numericUpDown_PLL_1_8G_DL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ATT_Enter);
1595
             this.numericUpDown_PLL_1_8G_DL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);
1637
             this.numericUpDown_PLL_1_8G_DL.Leave += new System.EventHandler(this.Activi_Change__SettingComplete);

+ 37 - 13
Basic_Terminal/Wnd/Main_Form.cs

@@ -313,29 +313,29 @@ namespace RF_TRIO_PLL_ZIG
313
                     ret = bluecell_BootProtocol.Bluecell_ReversePE43711_Calc(temp_val);
313
                     ret = bluecell_BootProtocol.Bluecell_ReversePE43711_Calc(temp_val);
314
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_COM3, ret.ToString());
314
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_ATT_3_5G_COM3, ret.ToString());
315
 
315
 
316
-                    temp_val  =  data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_H] << 8;
317
-                    temp_val  = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_L]) / 10);
318
-                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_1_8G_DL, temp_val.ToString());
316
+                    temp_val = data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_H] << 8;
317
+                    ret = ((double)(temp_val | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_DL_L]) / 10);
318
+                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_1_8G_DL, ret.ToString());
319
 
319
 
320
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_H] << 8;
320
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_H] << 8;
321
-                    temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_L]) / 10);
322
-                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_1_8G_UL, temp_val.ToString());
321
+                    ret = ((double)(temp_val | data[(int)Bluecell_TypeIndex_t.PLL_1_8G_UL_L]) / 10);
322
+                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_1_8G_UL, ret.ToString());
323
 
323
 
324
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_H] << 8;
324
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_H] << 8;
325
-                    temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_L]) / 10);
326
-                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_2_1G_DL, temp_val.ToString());
325
+                    ret = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_DL_L]) / 10);
326
+                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_2_1G_DL, ret.ToString());
327
 
327
 
328
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_H] << 8;
328
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_H] << 8;
329
-                    temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_L]) / 10);
330
-                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_2_1G_UL, temp_val.ToString());
329
+                    ret = ((double)(temp_val | data[(int)Bluecell_TypeIndex_t.PLL_2_1G_UL_L]) / 10);
330
+                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_2_1G_UL, ret.ToString());
331
 
331
 
332
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_H] << 8;
332
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_H] << 8;
333
-                    temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_L]) / 10);
334
-                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_DL, temp_val.ToString());
333
+                    ret = ((double)(temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_DL_L]) / 10);
334
+                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_DL, ret.ToString());
335
 
335
 
336
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] << 8;
336
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] << 8;
337
-                    temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L]) / 10);
338
-                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_UL, temp_val.ToString());
337
+                    ret = ((double)(temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L]) / 10);
338
+                    this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_UL, ret.ToString());
339
                     /***********************DAC A Sector**********************************/
339
                     /***********************DAC A Sector**********************************/
340
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_H] << 8;
340
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_H] << 8;
341
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_L]) );
341
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_L]) );
@@ -774,6 +774,30 @@ namespace RF_TRIO_PLL_ZIG
774
                     MessageBoxDefaultButton.Button1,
774
                     MessageBoxDefaultButton.Button1,
775
                     MessageBoxOptions.DefaultDesktopOnly);
775
                     MessageBoxOptions.DefaultDesktopOnly);
776
         }
776
         }
777
+        public void Message_Box_Error_Open(byte[] data)
778
+        {
779
+            byte type = data[(byte)Bluecell_TypeIndex_t.BLUE_CRCINDEX + 1];
780
+            string str = "";
781
+            if (type == 0)
782
+                str = "PLL 1.8 DL Error";
783
+            else if (type == 1)
784
+                str = "PLL 1.8 UL Error";
785
+            else if (type == 2)
786
+                str = "PLL 2.1 DL Error";
787
+            else if (type == 3)
788
+                str = "PLL 2.1 UL Error";
789
+            else
790
+                str = "Error!!!";
791
+            //blue_MessageBox blue_MessageBox = new Blue_MessageBox();
792
+            //MessageBox.Show("Setting OK");
793
+            if (setcheck_checkBox.Checked == true)
794
+                MessageBox.Show(str,
795
+                    "Setting",
796
+                    MessageBoxButtons.OK,
797
+                    MessageBoxIcon.Error,
798
+                    MessageBoxDefaultButton.Button1,
799
+                    MessageBoxOptions.DefaultDesktopOnly);
800
+        }
777
         private void comboBox_Port_MouseDown(object sender, MouseEventArgs e)
801
         private void comboBox_Port_MouseDown(object sender, MouseEventArgs e)
778
         {
802
         {
779
         //    serial.SetPortNameValues(comboBox_Port);
803
         //    serial.SetPortNameValues(comboBox_Port);