ソースを参照

2022-01-09;调试界面增加PCM交互控件

501776450 3 年 前
コミット
594a33689a

BIN
exe/apps/Tps_LQ_Transmitter/Tps_LQ_Transmitter.dll


BIN
exe/apps/Tps_LQ_Transmitter/Tps_LQ_Transmitter.pdb


BIN
tps/TpsLabStudio/.vs/TpsLabStudio/v16/.suo


+ 174 - 38
tps/TpsLabStudio/DebuggingForm.Designer.cs

@@ -29,6 +29,7 @@ namespace Tps_LQ_Transmitter
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.btnPowCh_1 = new DevComponents.DotNetBar.ButtonX();
             this.btnPowCh_2 = new DevComponents.DotNetBar.ButtonX();
             this.btnPowCh_4 = new DevComponents.DotNetBar.ButtonX();
@@ -136,6 +137,15 @@ namespace Tps_LQ_Transmitter
             this.gpbSendMode = new System.Windows.Forms.GroupBox();
             this.rbtnHdlcMode = new System.Windows.Forms.RadioButton();
             this.rbtnUartMode = new System.Windows.Forms.RadioButton();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
+            this.txtbPcmRd = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.btnCleartxtbPcmRd = new DevComponents.DotNetBar.ButtonX();
+            this.labelX34 = new DevComponents.DotNetBar.LabelX();
+            this.labelX35 = new DevComponents.DotNetBar.LabelX();
+            this.chkTimerEn = new DevComponents.DotNetBar.Controls.CheckBoxX();
+            this.txtbTimer2Num = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.timer2 = new System.Windows.Forms.Timer(this.components);
+            this.labelX36 = new DevComponents.DotNetBar.LabelX();
             this.gpbHdlcTr.SuspendLayout();
             this.gpbUartCheck.SuspendLayout();
             this.gpbSendMode.SuspendLayout();
@@ -924,7 +934,7 @@ namespace Tps_LQ_Transmitter
             this.chkAyCh_1.Size = new System.Drawing.Size(75, 23);
             this.chkAyCh_1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkAyCh_1.TabIndex = 1;
-            this.chkAyCh_1.Text = "通道1";
+            this.chkAyCh_1.Text = "陷/衰";
             this.chkAyCh_1.CheckedChanged += new System.EventHandler(this.chkAyCh_1_CheckedChanged);
             // 
             // labelX10
@@ -952,7 +962,7 @@ namespace Tps_LQ_Transmitter
             this.chkAyCh_2.Size = new System.Drawing.Size(75, 23);
             this.chkAyCh_2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkAyCh_2.TabIndex = 1;
-            this.chkAyCh_2.Text = "通道2";
+            this.chkAyCh_2.Text = "陷/衰";
             this.chkAyCh_2.CheckedChanged += new System.EventHandler(this.chkAyCh_2_CheckedChanged);
             // 
             // chkAyCh_3
@@ -967,7 +977,7 @@ namespace Tps_LQ_Transmitter
             this.chkAyCh_3.Size = new System.Drawing.Size(75, 23);
             this.chkAyCh_3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkAyCh_3.TabIndex = 1;
-            this.chkAyCh_3.Text = "通道3";
+            this.chkAyCh_3.Text = "陷/衰";
             this.chkAyCh_3.CheckedChanged += new System.EventHandler(this.chkAyCh_3_CheckedChanged);
             // 
             // chkAyCh_4
@@ -982,7 +992,7 @@ namespace Tps_LQ_Transmitter
             this.chkAyCh_4.Size = new System.Drawing.Size(75, 23);
             this.chkAyCh_4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkAyCh_4.TabIndex = 1;
-            this.chkAyCh_4.Text = "通道4";
+            this.chkAyCh_4.Text = "陷/衰";
             this.chkAyCh_4.CheckedChanged += new System.EventHandler(this.chkAyCh_4_CheckedChanged);
             // 
             // chkAyCh_5
@@ -997,7 +1007,7 @@ namespace Tps_LQ_Transmitter
             this.chkAyCh_5.Size = new System.Drawing.Size(75, 23);
             this.chkAyCh_5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkAyCh_5.TabIndex = 1;
-            this.chkAyCh_5.Text = "通道5";
+            this.chkAyCh_5.Text = "陷/衰";
             this.chkAyCh_5.CheckedChanged += new System.EventHandler(this.chkAyCh_5_CheckedChanged);
             // 
             // chkAyCh_6
@@ -1012,7 +1022,7 @@ namespace Tps_LQ_Transmitter
             this.chkAyCh_6.Size = new System.Drawing.Size(75, 23);
             this.chkAyCh_6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkAyCh_6.TabIndex = 1;
-            this.chkAyCh_6.Text = "通道6";
+            this.chkAyCh_6.Text = "陷/衰";
             this.chkAyCh_6.CheckedChanged += new System.EventHandler(this.chkAyCh_6_CheckedChanged);
             // 
             // chkAyCh_7
@@ -1054,10 +1064,10 @@ namespace Tps_LQ_Transmitter
             this.chkBxCh_1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.chkBxCh_1.Location = new System.Drawing.Point(166, 238);
             this.chkBxCh_1.Name = "chkBxCh_1";
-            this.chkBxCh_1.Size = new System.Drawing.Size(75, 23);
+            this.chkBxCh_1.Size = new System.Drawing.Size(101, 23);
             this.chkBxCh_1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkBxCh_1.TabIndex = 1;
-            this.chkBxCh_1.Text = "CH1";
+            this.chkBxCh_1.Text = "功率计";
             this.chkBxCh_1.CheckedChanged += new System.EventHandler(this.chkBxCh_1_CheckedChanged);
             // 
             // chkBxCh_2
@@ -1069,10 +1079,10 @@ namespace Tps_LQ_Transmitter
             this.chkBxCh_2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.chkBxCh_2.Location = new System.Drawing.Point(372, 238);
             this.chkBxCh_2.Name = "chkBxCh_2";
-            this.chkBxCh_2.Size = new System.Drawing.Size(75, 23);
+            this.chkBxCh_2.Size = new System.Drawing.Size(101, 23);
             this.chkBxCh_2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkBxCh_2.TabIndex = 1;
-            this.chkBxCh_2.Text = "CH2";
+            this.chkBxCh_2.Text = "频谱仪";
             this.chkBxCh_2.CheckedChanged += new System.EventHandler(this.chkBxCh_2_CheckedChanged);
             // 
             // chkBxCh_3
@@ -1084,10 +1094,10 @@ namespace Tps_LQ_Transmitter
             this.chkBxCh_3.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.chkBxCh_3.Location = new System.Drawing.Point(578, 238);
             this.chkBxCh_3.Name = "chkBxCh_3";
-            this.chkBxCh_3.Size = new System.Drawing.Size(75, 23);
+            this.chkBxCh_3.Size = new System.Drawing.Size(101, 23);
             this.chkBxCh_3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkBxCh_3.TabIndex = 1;
-            this.chkBxCh_3.Text = "CH3";
+            this.chkBxCh_3.Text = "解调入";
             this.chkBxCh_3.CheckedChanged += new System.EventHandler(this.chkBxCh_3_CheckedChanged);
             // 
             // chkBxCh_4
@@ -1102,7 +1112,7 @@ namespace Tps_LQ_Transmitter
             this.chkBxCh_4.Size = new System.Drawing.Size(75, 23);
             this.chkBxCh_4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkBxCh_4.TabIndex = 1;
-            this.chkBxCh_4.Text = "CH4";
+            this.chkBxCh_4.Text = "未接";
             this.chkBxCh_4.CheckedChanged += new System.EventHandler(this.chkBxCh_4_CheckedChanged);
             // 
             // labelX11
@@ -1138,12 +1148,12 @@ namespace Tps_LQ_Transmitter
             // 
             this.chkCzCh.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
             this.chkCzCh.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.chkCzCh.Location = new System.Drawing.Point(166, 278);
+            this.chkCzCh.Location = new System.Drawing.Point(166, 273);
             this.chkCzCh.Name = "chkCzCh";
-            this.chkCzCh.Size = new System.Drawing.Size(75, 23);
+            this.chkCzCh.Size = new System.Drawing.Size(116, 23);
             this.chkCzCh.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.chkCzCh.TabIndex = 1;
-            this.chkCzCh.Text = "控制";
+            this.chkCzCh.Text = "解调接入";
             this.chkCzCh.CheckedChanged += new System.EventHandler(this.chkCzCh_CheckedChanged);
             // 
             // ChkPowerOnOff
@@ -1439,9 +1449,9 @@ namespace Tps_LQ_Transmitter
             this.btnPcmSetting.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
             this.btnPcmSetting.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
             this.btnPcmSetting.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnPcmSetting.Location = new System.Drawing.Point(166, 702);
+            this.btnPcmSetting.Location = new System.Drawing.Point(166, 689);
             this.btnPcmSetting.Name = "btnPcmSetting";
-            this.btnPcmSetting.Size = new System.Drawing.Size(98, 48);
+            this.btnPcmSetting.Size = new System.Drawing.Size(98, 31);
             this.btnPcmSetting.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.btnPcmSetting.TabIndex = 7;
             this.btnPcmSetting.Text = "设置";
@@ -1455,21 +1465,21 @@ namespace Tps_LQ_Transmitter
             this.txtbPcmSend.Border.Class = "TextBoxBorder";
             this.txtbPcmSend.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
             this.txtbPcmSend.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtbPcmSend.Location = new System.Drawing.Point(593, 533);
+            this.txtbPcmSend.Location = new System.Drawing.Point(462, 509);
             this.txtbPcmSend.Name = "txtbPcmSend";
             this.txtbPcmSend.PreventEnterBeep = true;
-            this.txtbPcmSend.Size = new System.Drawing.Size(314, 31);
+            this.txtbPcmSend.Size = new System.Drawing.Size(415, 31);
             this.txtbPcmSend.TabIndex = 9;
-            this.txtbPcmSend.Text = "11 22 33 44 55";
+            this.txtbPcmSend.Text = "55 AA";
             // 
             // btnPcmSendx
             // 
             this.btnPcmSendx.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
             this.btnPcmSendx.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
             this.btnPcmSendx.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnPcmSendx.Location = new System.Drawing.Point(1003, 524);
+            this.btnPcmSendx.Location = new System.Drawing.Point(886, 509);
             this.btnPcmSendx.Name = "btnPcmSendx";
-            this.btnPcmSendx.Size = new System.Drawing.Size(98, 48);
+            this.btnPcmSendx.Size = new System.Drawing.Size(98, 31);
             this.btnPcmSendx.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
             this.btnPcmSendx.TabIndex = 10;
             this.btnPcmSendx.Text = "发送";
@@ -1498,7 +1508,7 @@ namespace Tps_LQ_Transmitter
             this.txtbBaudrate.Border.Class = "TextBoxBorder";
             this.txtbBaudrate.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
             this.txtbBaudrate.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtbBaudrate.Location = new System.Drawing.Point(257, 553);
+            this.txtbBaudrate.Location = new System.Drawing.Point(257, 547);
             this.txtbBaudrate.Name = "txtbBaudrate";
             this.txtbBaudrate.PreventEnterBeep = true;
             this.txtbBaudrate.Size = new System.Drawing.Size(112, 31);
@@ -1513,7 +1523,7 @@ namespace Tps_LQ_Transmitter
             // 
             this.labelX33.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
             this.labelX33.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.labelX33.Location = new System.Drawing.Point(157, 561);
+            this.labelX33.Location = new System.Drawing.Point(157, 555);
             this.labelX33.Name = "labelX33";
             this.labelX33.Size = new System.Drawing.Size(75, 23);
             this.labelX33.TabIndex = 3;
@@ -1523,7 +1533,7 @@ namespace Tps_LQ_Transmitter
             // rbtnRise
             // 
             this.rbtnRise.AutoSize = true;
-            this.rbtnRise.Location = new System.Drawing.Point(29, 24);
+            this.rbtnRise.Location = new System.Drawing.Point(29, 15);
             this.rbtnRise.Name = "rbtnRise";
             this.rbtnRise.Size = new System.Drawing.Size(59, 16);
             this.rbtnRise.TabIndex = 12;
@@ -1534,7 +1544,7 @@ namespace Tps_LQ_Transmitter
             // rbtnFall
             // 
             this.rbtnFall.AutoSize = true;
-            this.rbtnFall.Location = new System.Drawing.Point(130, 24);
+            this.rbtnFall.Location = new System.Drawing.Point(130, 15);
             this.rbtnFall.Name = "rbtnFall";
             this.rbtnFall.Size = new System.Drawing.Size(59, 16);
             this.rbtnFall.TabIndex = 12;
@@ -1546,9 +1556,9 @@ namespace Tps_LQ_Transmitter
             // 
             this.gpbHdlcTr.Controls.Add(this.rbtnFall);
             this.gpbHdlcTr.Controls.Add(this.rbtnRise);
-            this.gpbHdlcTr.Location = new System.Drawing.Point(166, 590);
+            this.gpbHdlcTr.Location = new System.Drawing.Point(166, 580);
             this.gpbHdlcTr.Name = "gpbHdlcTr";
-            this.gpbHdlcTr.Size = new System.Drawing.Size(203, 50);
+            this.gpbHdlcTr.Size = new System.Drawing.Size(203, 41);
             this.gpbHdlcTr.TabIndex = 13;
             this.gpbHdlcTr.TabStop = false;
             // 
@@ -1557,16 +1567,16 @@ namespace Tps_LQ_Transmitter
             this.gpbUartCheck.Controls.Add(this.rbtnNone);
             this.gpbUartCheck.Controls.Add(this.rbtnEven);
             this.gpbUartCheck.Controls.Add(this.rbtnOdd);
-            this.gpbUartCheck.Location = new System.Drawing.Point(166, 646);
+            this.gpbUartCheck.Location = new System.Drawing.Point(166, 627);
             this.gpbUartCheck.Name = "gpbUartCheck";
-            this.gpbUartCheck.Size = new System.Drawing.Size(203, 50);
+            this.gpbUartCheck.Size = new System.Drawing.Size(203, 41);
             this.gpbUartCheck.TabIndex = 13;
             this.gpbUartCheck.TabStop = false;
             // 
             // rbtnNone
             // 
             this.rbtnNone.AutoSize = true;
-            this.rbtnNone.Location = new System.Drawing.Point(130, 24);
+            this.rbtnNone.Location = new System.Drawing.Point(130, 16);
             this.rbtnNone.Name = "rbtnNone";
             this.rbtnNone.Size = new System.Drawing.Size(35, 16);
             this.rbtnNone.TabIndex = 12;
@@ -1577,7 +1587,7 @@ namespace Tps_LQ_Transmitter
             // rbtnEven
             // 
             this.rbtnEven.AutoSize = true;
-            this.rbtnEven.Location = new System.Drawing.Point(81, 24);
+            this.rbtnEven.Location = new System.Drawing.Point(81, 16);
             this.rbtnEven.Name = "rbtnEven";
             this.rbtnEven.Size = new System.Drawing.Size(35, 16);
             this.rbtnEven.TabIndex = 12;
@@ -1588,7 +1598,7 @@ namespace Tps_LQ_Transmitter
             // rbtnOdd
             // 
             this.rbtnOdd.AutoSize = true;
-            this.rbtnOdd.Location = new System.Drawing.Point(29, 24);
+            this.rbtnOdd.Location = new System.Drawing.Point(29, 16);
             this.rbtnOdd.Name = "rbtnOdd";
             this.rbtnOdd.Size = new System.Drawing.Size(35, 16);
             this.rbtnOdd.TabIndex = 12;
@@ -1602,14 +1612,14 @@ namespace Tps_LQ_Transmitter
             this.gpbSendMode.Controls.Add(this.rbtnUartMode);
             this.gpbSendMode.Location = new System.Drawing.Point(166, 500);
             this.gpbSendMode.Name = "gpbSendMode";
-            this.gpbSendMode.Size = new System.Drawing.Size(203, 47);
+            this.gpbSendMode.Size = new System.Drawing.Size(203, 40);
             this.gpbSendMode.TabIndex = 13;
             this.gpbSendMode.TabStop = false;
             // 
             // rbtnHdlcMode
             // 
             this.rbtnHdlcMode.AutoSize = true;
-            this.rbtnHdlcMode.Location = new System.Drawing.Point(130, 24);
+            this.rbtnHdlcMode.Location = new System.Drawing.Point(130, 17);
             this.rbtnHdlcMode.Name = "rbtnHdlcMode";
             this.rbtnHdlcMode.Size = new System.Drawing.Size(47, 16);
             this.rbtnHdlcMode.TabIndex = 12;
@@ -1621,7 +1631,7 @@ namespace Tps_LQ_Transmitter
             // rbtnUartMode
             // 
             this.rbtnUartMode.AutoSize = true;
-            this.rbtnUartMode.Location = new System.Drawing.Point(29, 24);
+            this.rbtnUartMode.Location = new System.Drawing.Point(29, 17);
             this.rbtnUartMode.Name = "rbtnUartMode";
             this.rbtnUartMode.Size = new System.Drawing.Size(47, 16);
             this.rbtnUartMode.TabIndex = 12;
@@ -1630,15 +1640,128 @@ namespace Tps_LQ_Transmitter
             this.rbtnUartMode.UseVisualStyleBackColor = true;
             this.rbtnUartMode.CheckedChanged += new System.EventHandler(this.rbtnUartMode_CheckedChanged);
             // 
+            // timer1
+            // 
+            this.timer1.Enabled = true;
+            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+            // 
+            // txtbPcmRd
+            // 
+            // 
+            // 
+            // 
+            this.txtbPcmRd.Border.Class = "TextBoxBorder";
+            this.txtbPcmRd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.txtbPcmRd.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtbPcmRd.Location = new System.Drawing.Point(462, 590);
+            this.txtbPcmRd.Multiline = true;
+            this.txtbPcmRd.Name = "txtbPcmRd";
+            this.txtbPcmRd.PreventEnterBeep = true;
+            this.txtbPcmRd.Size = new System.Drawing.Size(415, 78);
+            this.txtbPcmRd.TabIndex = 9;
+            // 
+            // btnCleartxtbPcmRd
+            // 
+            this.btnCleartxtbPcmRd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+            this.btnCleartxtbPcmRd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+            this.btnCleartxtbPcmRd.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnCleartxtbPcmRd.Location = new System.Drawing.Point(886, 590);
+            this.btnCleartxtbPcmRd.Name = "btnCleartxtbPcmRd";
+            this.btnCleartxtbPcmRd.Size = new System.Drawing.Size(98, 31);
+            this.btnCleartxtbPcmRd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+            this.btnCleartxtbPcmRd.TabIndex = 10;
+            this.btnCleartxtbPcmRd.Text = "清空";
+            this.btnCleartxtbPcmRd.Click += new System.EventHandler(this.btnCleartxtbPcmRd_Click);
+            // 
+            // labelX34
+            // 
+            // 
+            // 
+            // 
+            this.labelX34.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX34.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.labelX34.Location = new System.Drawing.Point(397, 513);
+            this.labelX34.Name = "labelX34";
+            this.labelX34.Size = new System.Drawing.Size(59, 23);
+            this.labelX34.TabIndex = 3;
+            this.labelX34.Text = "发送";
+            this.labelX34.TextAlignment = System.Drawing.StringAlignment.Far;
+            // 
+            // labelX35
+            // 
+            // 
+            // 
+            // 
+            this.labelX35.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX35.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.labelX35.Location = new System.Drawing.Point(397, 595);
+            this.labelX35.Name = "labelX35";
+            this.labelX35.Size = new System.Drawing.Size(59, 23);
+            this.labelX35.TabIndex = 3;
+            this.labelX35.Text = "接收";
+            this.labelX35.TextAlignment = System.Drawing.StringAlignment.Far;
+            // 
+            // chkTimerEn
+            // 
+            // 
+            // 
+            // 
+            this.chkTimerEn.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.chkTimerEn.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.chkTimerEn.Location = new System.Drawing.Point(1013, 513);
+            this.chkTimerEn.Name = "chkTimerEn";
+            this.chkTimerEn.Size = new System.Drawing.Size(126, 23);
+            this.chkTimerEn.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+            this.chkTimerEn.TabIndex = 1;
+            this.chkTimerEn.Text = "定时发送";
+            this.chkTimerEn.CheckedChanged += new System.EventHandler(this.chkTimerEn_CheckedChanged);
+            // 
+            // txtbTimer2Num
+            // 
+            // 
+            // 
+            // 
+            this.txtbTimer2Num.Border.Class = "TextBoxBorder";
+            this.txtbTimer2Num.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.txtbTimer2Num.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtbTimer2Num.Location = new System.Drawing.Point(1160, 509);
+            this.txtbTimer2Num.Name = "txtbTimer2Num";
+            this.txtbTimer2Num.PreventEnterBeep = true;
+            this.txtbTimer2Num.Size = new System.Drawing.Size(52, 31);
+            this.txtbTimer2Num.TabIndex = 9;
+            this.txtbTimer2Num.Text = "1000";
+            this.txtbTimer2Num.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.txtbTimer2Num.TextChanged += new System.EventHandler(this.txtbTimer2Num_TextChanged);
+            // 
+            // timer2
+            // 
+            this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
+            // 
+            // labelX36
+            // 
+            // 
+            // 
+            // 
+            this.labelX36.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX36.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.labelX36.Location = new System.Drawing.Point(1218, 513);
+            this.labelX36.Name = "labelX36";
+            this.labelX36.Size = new System.Drawing.Size(31, 23);
+            this.labelX36.TabIndex = 3;
+            this.labelX36.Text = "mS";
+            // 
             // DebuggingForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1028, 749);
+            this.ClientSize = new System.Drawing.Size(1370, 749);
             this.Controls.Add(this.gpbUartCheck);
             this.Controls.Add(this.gpbSendMode);
             this.Controls.Add(this.gpbHdlcTr);
+            this.Controls.Add(this.btnCleartxtbPcmRd);
             this.Controls.Add(this.btnPcmSendx);
+            this.Controls.Add(this.txtbPcmRd);
+            this.Controls.Add(this.txtbTimer2Num);
             this.Controls.Add(this.txtbPcmSend);
             this.Controls.Add(this.btnPcmSetting);
             this.Controls.Add(this.btnOther);
@@ -1652,9 +1775,12 @@ namespace Tps_LQ_Transmitter
             this.Controls.Add(this.led2);
             this.Controls.Add(this.led1);
             this.Controls.Add(this.labelX6);
+            this.Controls.Add(this.labelX35);
+            this.Controls.Add(this.labelX34);
             this.Controls.Add(this.labelX9);
             this.Controls.Add(this.labelX32);
             this.Controls.Add(this.labelX31);
+            this.Controls.Add(this.labelX36);
             this.Controls.Add(this.labelX30);
             this.Controls.Add(this.labelX29);
             this.Controls.Add(this.labelX28);
@@ -1723,6 +1849,7 @@ namespace Tps_LQ_Transmitter
             this.Controls.Add(this.chkCzCh);
             this.Controls.Add(this.chkBxCh_1);
             this.Controls.Add(this.chkAyCh_1);
+            this.Controls.Add(this.chkTimerEn);
             this.Controls.Add(this.ChkPowerOnOff);
             this.Controls.Add(this.checkBoxX1);
             this.Controls.Add(this.chkStCh_1);
@@ -1857,5 +1984,14 @@ namespace Tps_LQ_Transmitter
         private System.Windows.Forms.GroupBox gpbSendMode;
         private System.Windows.Forms.RadioButton rbtnHdlcMode;
         private System.Windows.Forms.RadioButton rbtnUartMode;
+        private System.Windows.Forms.Timer timer1;
+        private DevComponents.DotNetBar.Controls.TextBoxX txtbPcmRd;
+        private DevComponents.DotNetBar.ButtonX btnCleartxtbPcmRd;
+        private DevComponents.DotNetBar.LabelX labelX34;
+        private DevComponents.DotNetBar.LabelX labelX35;
+        private DevComponents.DotNetBar.Controls.CheckBoxX chkTimerEn;
+        private DevComponents.DotNetBar.Controls.TextBoxX txtbTimer2Num;
+        private System.Windows.Forms.Timer timer2;
+        private DevComponents.DotNetBar.LabelX labelX36;
     }
 }

+ 63 - 12
tps/TpsLabStudio/DebuggingForm.cs

@@ -51,22 +51,35 @@ namespace Tps_LQ_Transmitter
             dio.portClose();
             power.portClose();
             pcm.portClose();
-            
-            
+            SeriesPortChildThread.Abort();
+
         }
         string tamp="";
         public void Displaywhile()
         {
             string st;
+            
             while (true)
             {
-                st = BytesToHexString(pcm.OnlyRead());
-                if (st != "" && st != tamp)
+                byte[] byrd = pcm.OnlyRead();
+
+                //if (byrd != null && byrd[0] == 0xF0 && byrd[1] == 0x0F && byrd[2] == 0x03)
                 {
-                    tamp = st;
+                    //byte[] br = new byte[byrd.Length-6];
+                    //for (int i = 0; i < br.Length; i++)
+                    //{
+                    //    br[i] = byrd[6 + i];
+                    //}
+                    st = BytesToHexString(byrd);
+                    if (st != "" && st != tamp)
+                    {
+
+                        tamp = st;
+                    }
                 }
+                
+                Thread.Sleep(100);          
             }
-
         }
 
         #region 8路供电开关控制(+28V)代码
@@ -181,7 +194,7 @@ namespace Tps_LQ_Transmitter
         /// byte[]数据转字符串输出
         /// </summary>
         /// <param name="data">byte[]数据</param>
-        /// <returns>字符串</returns>
+        /// <returns>16进制字符串</returns>
         public string BytesToHexString(byte[] data)
         {
             if (data == null)
@@ -190,7 +203,7 @@ namespace Tps_LQ_Transmitter
             StringBuilder sb = new StringBuilder(100);
             for (int i = 0; i < data.Length; i++)
             {
-                sb.Append("0x" + data[i].ToString("X2") + " ");
+                sb.Append(data[i].ToString("X2") + " ");
             }
             return sb.ToString();
         }
@@ -683,11 +696,11 @@ namespace Tps_LQ_Transmitter
                 }
                 txtbMsg.Text = pcm.DataSend(bytx).ToString();
             }
-           
-
-            
         }
-
+        private void btnCleartxtbPcmRd_Click(object sender, EventArgs e)
+        {
+            tamp ="";
+        }
         private void btnPcmSetting_Click(object sender, EventArgs e)
         {
             string mode = "UART";
@@ -764,5 +777,43 @@ namespace Tps_LQ_Transmitter
                 rbtnRise.Checked = true;
             }
         }
+        private void chkTimerEn_CheckedChanged(object sender, EventArgs e)
+        {
+            timer2.Interval = int.Parse(txtbTimer2Num.Text);
+            timer2.Enabled = chkTimerEn.Checked;
+        }
+        /// <summary>
+        /// 定时器1:定时刷新PCM接收文本窗口
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void timer1_Tick(object sender, EventArgs e)
+        {
+            txtbPcmRd.Text = tamp;
+        }
+        /// <summary>
+        /// 定时器2:PCM定时发送
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void timer2_Tick(object sender, EventArgs e)
+        {
+            string str = txtbPcmSend.Text;
+            if (str != "" && str != null)
+            {
+                string[] sArray = Regex.Split(str, " ", RegexOptions.IgnoreCase);
+                byte[] bytx = new byte[sArray.Length];
+                for (int i = 0; i < sArray.Length; i++)
+                {
+                    bytx[i] = Convert.ToByte(sArray[i], 16);
+                }
+                txtbMsg.Text = pcm.DataSend(bytx,0).ToString();
+            }
+        }
+
+        private void txtbTimer2Num_TextChanged(object sender, EventArgs e)
+        {
+            timer2.Interval = int.Parse(txtbTimer2Num.Text);
+        }
     }
 }

+ 9 - 0
tps/TpsLabStudio/DebuggingForm.resx

@@ -117,4 +117,13 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>107, 17</value>
+  </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>42</value>
+  </metadata>
 </root>

+ 10 - 1
tps/TpsLabStudio/FrmMain.cs

@@ -738,13 +738,22 @@ namespace Tps_LQ_Transmitter
         {
 
         }
-
+        /// <summary>
+        /// 打开调试界面事件处理
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void btnDebugging_Click(object sender, EventArgs e)
         {
             DebuggingForm debuggingForm = new DebuggingForm();
             debuggingForm.Show();
         }
 
+        /// <summary>
+        /// 产品编号框添加、插入、删除事件处理
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void tbSerials_KeyDown(object sender, KeyEventArgs e)
   
         {

+ 1 - 1
tps/TpsLabStudio/TpsLabStudio.csproj.user

@@ -5,6 +5,6 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
     <StartAction>Program</StartAction>
-    <StartProgram>D:\lqCode\TpsLabStudio_LTS\exe\JGWorks.exe</StartProgram>
+    <StartProgram>E:\LqTest\TpsLabStudio_LTS\exe\JGWorks.exe</StartProgram>
   </PropertyGroup>
 </Project>

+ 30 - 48
tps/TpsLabStudio/com/PcmControl.cs

@@ -17,7 +17,7 @@ namespace Tps_LQ_Transmitter.com
         public PcmControl()
         {
             serial = new SerialPort();
-            serial.PortName = "COM5";     //DIO控制板与JSY模块都是RS485通信共用计算机的串口COM6
+            serial.PortName = "COM5";     //PCM模块是RS232通信共用计算机的串口COM5
             serial.BaudRate = 115200;
             serial.DataBits = 8;
             serial.StopBits = StopBits.One;//停止位设置为com_stop的值
@@ -64,22 +64,35 @@ namespace Tps_LQ_Transmitter.com
             {
                 byte[] dat = new byte[serial.BytesToRead];
                 serial.Read(dat, 0, dat.Length);
+               
+
+
                 return dat;
             }
             else
             {
-                return null;
+                return data;
             }
         }
-
+        /// <summary>
+        /// PCM仅读方法
+        /// </summary>
+        /// <returns></returns>
         public byte[] OnlyRead()
         {
-            
-            if (serial.BytesToRead > 0)
+
+            if (serial.IsOpen == true)
             {
-                byte[] dat = new byte[serial.BytesToRead];
-                serial.Read(dat, 0, dat.Length);
-                return dat;
+                if (serial.BytesToRead > 0)
+                {
+                    byte[] dat = new byte[serial.BytesToRead];
+                    serial.Read(dat, 0, dat.Length);
+                    return dat;
+                }
+                else
+                {
+                    return null;
+                }
             }
             else
             {
@@ -89,7 +102,7 @@ namespace Tps_LQ_Transmitter.com
         /// <summary>
         /// PCM设置命令发送
         /// </summary>
-        /// <param name="mode">"UART"/"HDLC"</param>
+        /// <param name="mode">发送模式选择:"UART"/"HDLC"</param>
         /// <param name="choice">"ODD"/"EVEN"/"NONE"/"FALL"/"RISE"</param>
         /// <param name="baudrate">波特率</param>
         /// <returns>结果</returns>
@@ -138,44 +151,13 @@ namespace Tps_LQ_Transmitter.com
             }
             return bolrd;
         }
-        public bool UartSendSetting()
-        {
-            bool bolrd = false;
-            byte[] byst = { 0xF0, 0x0F, 0x02, 0x00, 0x00, 0x03, 0x00, 0xDB, 0x01 };
-            byte[] byrd = new byte[10];
-            byte[] byrdx = { 0xF0, 0x0F, 0x02, 0x00, 0x00, 0x03, 0x00, 0xDB, 0x01 ,0x24};
-            byrd=WriteRead(byst);
-            if (byrd.Length >= 10)
-            {
-                bolrd = true;
-                for (int i = 0; i < byrdx.Length; i++)
-                {
-                    if (byrd[i] != byrdx[i])
-                        bolrd = false;
-                }
-            }
-            return bolrd;
-        }
-
-        public bool HdlcSendSetting()
-        {
-            bool bolrd = false;
-            byte[] byst = { 0xF0, 0x0F, 0x02, 0x00, 0x00, 0x03, 0x00, 0x0D, 0x41 };
-            byte[] byrd = new byte[10];
-            byte[] byrdx = { 0xF0, 0x0F, 0x02, 0x00, 0x00, 0x03, 0x00, 0x0D, 0x41, 0xB2 };
-            byrd = WriteRead(byst);
-            if (byrd.Length >= 10)
-            {
-                bolrd = true;
-                for (int i = 0; i < byrdx.Length; i++)
-                {
-                    if (byrd[i] != byrdx[i])
-                        bolrd = false;
-                }
-            }
-            return bolrd;
-        }
-        public bool DataSend(byte[] data)
+       
+        /// <summary>
+        /// PCM数据发送
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        public bool DataSend(byte[] data,int delay=50)
         {
             bool bolrd = false;
             if (data!=null && data.Length>0)
@@ -191,7 +173,7 @@ namespace Tps_LQ_Transmitter.com
                 {
                     sd[6 + i] = data[i];
                 }
-                byte[] byrd = WriteRead(sd);
+                byte[] byrd = WriteRead(sd, delay);
                 if (byrd.Length >= sd.Length)
                 {
                     bolrd = true;

BIN
tps/TpsLabStudio/obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
tps/TpsLabStudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 0 - 0
tps/TpsLabStudio/obj/Debug/TpsLabStudio.csproj.CopyComplete


+ 1 - 1
tps/TpsLabStudio/obj/Debug/TpsLabStudio.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-60fbec6b54fa85610b87ef640925469373f3f35d
+decb6b1390e476d37613ac290019654e8fcb6be4

+ 20 - 0
tps/TpsLabStudio/obj/Debug/TpsLabStudio.csproj.FileListAbsolute.txt

@@ -159,3 +159,23 @@ D:\lqCode\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\TpsLabStudio.csproj.CoreCo
 D:\lqCode\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\TpsLabStudio.csproj.CopyComplete
 D:\lqCode\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.dll
 D:\lqCode\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.pdb
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\aa.PNG
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\config\测试#常温测试#9B发射机-N9030A.xlsx
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\config\测试#常温测试#YZH16A发射机-N9030A.xlsx
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\config\测试#常温测试#发射机_FSU-26.xlsx
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\test.png
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\bundle.config
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\config\ModulationMode.xlsx
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\config\串口控制.xlsx
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\Tps_LQ_Transmitter.dll
+E:\LqTest\TpsLabStudio_LTS\exe\apps\Tps_LQ_Transmitter\Tps_LQ_Transmitter.pdb
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\TpsLabStudio.csproj.AssemblyReference.cache
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.DebuggingForm.resources
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.FrmMain.resources
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.Properties.Resources.resources
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.views.FrmDevice.resources
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.views.FrmMsg.resources
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\TpsLabStudio.csproj.GenerateResource.cache
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\TpsLabStudio.csproj.CoreCompileInputs.cache
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.dll
+E:\LqTest\TpsLabStudio_LTS\tps\TpsLabStudio\obj\Debug\Tps_LQ_Transmitter.pdb

BIN
tps/TpsLabStudio/obj/Debug/TpsLabStudio.csproj.GenerateResource.cache


BIN
tps/TpsLabStudio/obj/Debug/Tps_LQ_Transmitter.dll


BIN
tps/TpsLabStudio/obj/Debug/Tps_LQ_Transmitter.pdb