Browse Source

优化配置执行指令

yhluo 1 month ago
parent
commit
d1513a9894
1 changed files with 13 additions and 13 deletions
  1. 13 13
      UAS_MES_HYSX/FunctionCode/Make/Make_WirelessThroughput.cs

+ 13 - 13
UAS_MES_HYSX/FunctionCode/Make/Make_WirelessThroughput.cs

@@ -267,23 +267,23 @@ namespace UAS_MES_NEW.Make
                 ShowMsg(0, "请输入测试时长");
                 return true;
             }
-            if (comboBox1.SelectedIndex == -1)
-            {
-                ShowMsg(0, "请选择指令模式");
-                return true;
-            }
-
-            //if (Locat1.Checked == false || Locat2.Checked == false || Locat3.Checked == false)
+            //if (comboBox1.SelectedIndex == -1)
             //{
-            //    ShowMsg(0, "请选择固件位置");
+            //    ShowMsg(0, "请选择指令模式");
             //    return true;
             //}
 
-            //if (Radio1.Checked == false || Radio1.Checked == false )
+            //if (Locat1.Checked == false || Locat2.Checked == false || Locat3.Checked == false)
             //{
-            //    ShowMsg(0, "请选择测试类型");
+            //    ShowMsg(0, "请选择固件位置");
             //    return true;
             //}
+
+            if (Radio1.Checked == false || Radio1.Checked == false)
+            {
+                ShowMsg(0, "请选择测试类型");
+                return true;
+            }
             return false;
         }
 
@@ -417,7 +417,7 @@ namespace UAS_MES_NEW.Make
                     WriteStream(_telnetStream, cmdList[2]);
                     streamTxt.Append(ReadStream(_telnetStream));
 
-                    WriteStream(_telnetStream, cmdList[0].Replace("Port", iperfServerPort.ToString()));
+                    WriteStream(_telnetStream, cmdList[0].Trim().Replace("Port", iperfServerPort.ToString()));
                     streamTxt.Append(ReadStream(_telnetStream));
 
                     cmdLog = Path.Combine(logDirectory, $"{SN}_CMD.log");
@@ -426,8 +426,8 @@ namespace UAS_MES_NEW.Make
                     upLog = Path.Combine(logDirectory, $"{SN}_up.log");
                     downLog = Path.Combine(logDirectory, $"{SN}_down.log");
 
-                    RunIperfClient(cmdList[1].Replace("IP", cameraIp).Replace("Port", iperfServerPort.ToString()) + "-R", iperfPath, upLog);
-                    RunIperfClient(cmdList[1].Replace("IP", cameraIp).Replace("Port", iperfServerPort.ToString()), iperfPath, downLog);
+                    RunIperfClient(cmdList[1].Trim().Replace("IP", cameraIp).Replace("Port", iperfServerPort.ToString()) + " -R", iperfPath, upLog);
+                    RunIperfClient(cmdList[1].Trim().Replace("IP", cameraIp).Replace("Port", iperfServerPort.ToString()), iperfPath, downLog);
 
                     upRate = ParseIperfBitrate(upLog);
                     downRate = ParseIperfBitrate(downLog);