|
@@ -295,6 +295,12 @@ namespace Bird_tool
|
|
|
}
|
|
|
}
|
|
|
//_serialManager.OnLineReceived += _handle_received_line;
|
|
|
+ _serialManager.OnDisconnect += (isError) =>
|
|
|
+ {
|
|
|
+ _uart_ui_change(false);
|
|
|
+ // 判断是否在测试
|
|
|
+ StopTest(isError);
|
|
|
+ };
|
|
|
}
|
|
|
private void load_app_config()
|
|
|
{
|
|
@@ -410,7 +416,7 @@ namespace Bird_tool
|
|
|
if (_serialManager.IsOpen())
|
|
|
{
|
|
|
// 调用停止函数
|
|
|
- StopTest();
|
|
|
+ StopTest(true);
|
|
|
_serialManager.Disconnect();
|
|
|
System.Threading.Thread.Sleep(100);
|
|
|
_uart_ui_change(false);
|
|
@@ -754,7 +760,6 @@ namespace Bird_tool
|
|
|
progressPanel.Visible = false;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
private void ui_show_test_panpel()
|
|
|
{
|
|
|
ui_hide_start_panpel();
|
|
@@ -794,7 +799,7 @@ namespace Bird_tool
|
|
|
if (!_testExecutor.InitTest(steps))
|
|
|
{
|
|
|
Log_show("无法创建测试表");
|
|
|
- StopTest();
|
|
|
+ StopTest(false);
|
|
|
return;
|
|
|
}
|
|
|
ui_show_test_panpel();
|
|
@@ -858,10 +863,10 @@ namespace Bird_tool
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- private void StopTest()
|
|
|
+ private void StopTest(bool isQuery = true)
|
|
|
{
|
|
|
// 停止测试
|
|
|
- if (_testExecutor.isStart)
|
|
|
+ if (isQuery && _testExecutor.isStart)
|
|
|
{
|
|
|
if (MessageBox.Show("确定要停止当前测试吗?", "确认停止",
|
|
|
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
|
@@ -915,7 +920,7 @@ namespace Bird_tool
|
|
|
|
|
|
|
|
|
// 按钮长按功能测试
|
|
|
- /**
|
|
|
+ ///**
|
|
|
new TestStepConfig
|
|
|
{
|
|
|
GroupId = "btn_long",
|
|
@@ -939,7 +944,7 @@ namespace Bird_tool
|
|
|
DelayBefore = 1000,
|
|
|
MaxRetries = 3,
|
|
|
},
|
|
|
- */
|
|
|
+ //*/
|
|
|
|
|
|
// 按钮双击功能测试
|
|
|
new TestStepConfig
|
|
@@ -1177,7 +1182,7 @@ namespace Bird_tool
|
|
|
},
|
|
|
|
|
|
// 音频测试
|
|
|
- /**
|
|
|
+ ///**
|
|
|
new TestStepConfig
|
|
|
{
|
|
|
GroupId = "Audio_test",
|
|
@@ -1239,7 +1244,7 @@ namespace Bird_tool
|
|
|
// 失败时重新录制
|
|
|
}
|
|
|
},
|
|
|
- */
|
|
|
+ //*/
|
|
|
|
|
|
// 补光灯测试
|
|
|
new TestStepConfig
|
|
@@ -1312,7 +1317,7 @@ namespace Bird_tool
|
|
|
GroupId = "wifi_test",
|
|
|
GroupName = "WiFi测试",
|
|
|
ShowStep = false,
|
|
|
- Name = "配置WiFi",
|
|
|
+ Name = "配置WiFi账号",
|
|
|
Tips = "自动配置wifi信息",
|
|
|
Action = ActionMode.SetVal,
|
|
|
VariableNames = { "ssid", "password" },
|
|
@@ -1322,8 +1327,9 @@ namespace Bird_tool
|
|
|
{
|
|
|
GroupId = "wifi_test",
|
|
|
ShowStep = false,
|
|
|
- Name = "配置设备激活码",
|
|
|
- Tips = "自动配置wifi信息",
|
|
|
+ Name = "配置设备wifi密码",
|
|
|
+ Tips = "自动配置wifi账号",
|
|
|
+ PrivateCammand = true,
|
|
|
Action = ActionMode.SetVal,
|
|
|
VariableNames = { "activeCode" },
|
|
|
VariableValues = { wifi_act },
|