Browse Source

调整高拍仪拍照内容(开启高拍仪后暂停1s)

master
胡超1 1 year ago
parent
commit
29bcfa9a2c
  1. 1
      CPF_Cef/Common/ChunkedUpload.cs
  2. 13
      CPF_Cef/MainModel.cs

1
CPF_Cef/Common/ChunkedUpload.cs

@ -119,6 +119,7 @@ namespace AksWebBrowser.Common
// 读取响应内容
string body = await response.Content.ReadAsStringAsync();
ret = body;
Log.Info("读取高拍仪响应内容:" + body);
}
}
catch (HttpRequestException e)

13
CPF_Cef/MainModel.cs

@ -581,7 +581,8 @@ namespace AksWebBrowser
//}
string devindex = GetSnIndex();
if (string.IsNullOrEmpty(devindex)) {
if (string.IsNullOrEmpty(devindex))
{
devindex = Parame.gpydevIndex;
}
//打开高拍仪
@ -594,16 +595,16 @@ namespace AksWebBrowser
}
else
{
//开启纠偏
EnableDeskImage(1);
Task.Delay(1000).Wait();
//拍照
param = getFrame();
//Log.Info("img2" + (param));
Task.Delay(1000).Wait();
Log.Info("拍照结果img2:" + (param));
if (string.IsNullOrEmpty(param))
{
//关闭
StopSn(devindex);
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "获取图片失败" + "\"}";
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "扫描失败,请重新扫描" + "\"}";
SubmitLogs(result, "openCamera");
return result;
}
@ -1073,6 +1074,8 @@ namespace AksWebBrowser
//开始播放
command = $"sox {url} -d";
ShllCommad(command);
//执行命令
Log.Info("执行命令:" + command);
//AutoAudio(ispaly, path);
});
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}";

Loading…
Cancel
Save