Commit 5061cf15 authored by 潘栩锋's avatar 潘栩锋 🚴

流延测厚仪安装包_v7.3.2_20211113

1. 修复 流延测厚仪服务器 保存图片 很慢
2. 修复 流延测厚仪服务器 删除图片出错(不存在的文件夹)
3. 优化 AD盒参数保存在电脑。 避免AD盒 i2c 有问题。
parent 2705bf65
...@@ -68,6 +68,11 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -68,6 +68,11 @@ namespace FLY.Thick.FilmCasting.UI.Server
/// </summary> /// </summary>
public bool IsPercent { get; set; } = true; public bool IsPercent { get; set; } = true;
/// <summary>
/// 自动目标值
/// </summary>
public bool IsAutoTarget { get; set; }
#endregion #endregion
#region 状态 #region 状态
/// <summary> /// <summary>
...@@ -165,10 +170,14 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -165,10 +170,14 @@ namespace FLY.Thick.FilmCasting.UI.Server
TimeRange = TimeSpan.FromMinutes(5), TimeRange = TimeSpan.FromMinutes(5),
AvgRange = scanWarning.Target * scanWarning.TolerancePercent * 2 AvgRange = scanWarning.Target * scanWarning.TolerancePercent * 2
}, },
async (object asyncContext, object retData) => (object asyncContext, object retData) =>
{ {
Pack_GetFrameReponse reponse = retData as Pack_GetFrameReponse; //创建新线程跑下面的
await Add(reponse); Task.Factory.StartNew((obj) =>
{
Pack_GetFrameReponse reponse = obj as Pack_GetFrameReponse;
Add(reponse);
}, retData);
}, this); }, this);
} }
...@@ -264,7 +273,7 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -264,7 +273,7 @@ namespace FLY.Thick.FilmCasting.UI.Server
ChartToImage.SaveToJpeg(scanGraph, path); ChartToImage.SaveToJpeg(scanGraph, path);
} }
public async Task Add(Pack_GetFrameReponse reponse) void Add(Pack_GetFrameReponse reponse)
{ {
if (reponse.scanData == null) if (reponse.scanData == null)
return;//没有数据 return;//没有数据
...@@ -280,30 +289,27 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -280,30 +289,27 @@ namespace FLY.Thick.FilmCasting.UI.Server
//ALL //ALL
string path = CreateCurrPath(reponse.scanData.EndTime, false); string path = CreateCurrPath(reponse.scanData.EndTime, false);
App.Current.MainWindow.Dispatcher.Invoke(() => timer.Dispatcher.Invoke(() =>
{ {
scanGraphVm.UpdateValue(reponse, isWarning); scanGraphVm.UpdateValue(reponse, isWarning);
SavePic(path); SavePic(path);
}); });
await Task.Factory.StartNew(() => try
{ {
try if (isWarning)
{
if (isWarning)
{
string path_iswarning = CreateCurrPath(reponse.scanData.EndTime, true);
File.Copy(path, path_iswarning, true);
}
Keep();
}
catch
{ {
return; string path_iswarning = CreateCurrPath(reponse.scanData.EndTime, true);
File.Copy(path, path_iswarning, true);
} }
});
Keep();
}
catch
{
return;
}
} }
...@@ -373,11 +379,46 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -373,11 +379,46 @@ namespace FLY.Thick.FilmCasting.UI.Server
{ {
while (dateInRootPath.Count > KeepDay) while (dateInRootPath.Count > KeepDay)
{ {
string dirpath = RootPath + @"\all\" + dateInRootPath.First().ToString(@"yyyy\\MM\\dd"); try
Directory.Delete(dirpath, true); {
string dirpath = RootPath + @"\all\" + dateInRootPath.First().ToString(@"yyyy\\MM\\dd");
if (Directory.Exists(dirpath))
{
Directory.Delete(dirpath, true);
dirpath = RootPath + @"\iswarning\" + dateInRootPath.First().ToString(@"yyyy\\MM\\dd"); //检测上级文件夹,里面是空的,那就继续删除
Directory.Delete(dirpath, true); dirpath = RootPath + @"\all\" + dateInRootPath.First().ToString(@"yyyy\\MM");
Directory.Delete(dirpath);
dirpath = RootPath + @"\all\" + dateInRootPath.First().ToString(@"yyyy");
Directory.Delete(dirpath);
}
}
catch
{
//删除不了。不管了。。。。
}
try
{
string dirpath = RootPath + @"\iswarning\" + dateInRootPath.First().ToString(@"yyyy\\MM\\dd");
if (Directory.Exists(dirpath))
{
Directory.Delete(dirpath, true);
//检测上级文件夹,里面是空的,那就继续删除
dirpath = RootPath + @"\iswarning\" + dateInRootPath.First().ToString(@"yyyy\\MM");
Directory.Delete(dirpath);
dirpath = RootPath + @"\iswarning\" + dateInRootPath.First().ToString(@"yyyy");
Directory.Delete(dirpath);
}
}
catch
{
//删除不了。不管了。。。。
}
dateInRootPath.RemoveAt(0); dateInRootPath.RemoveAt(0);
} }
...@@ -490,5 +531,10 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -490,5 +531,10 @@ namespace FLY.Thick.FilmCasting.UI.Server
/// Y轴%显示 /// Y轴%显示
/// </summary> /// </summary>
public bool IsPercent { get; set; } = true; public bool IsPercent { get; set; } = true;
/// <summary>
/// 自动目标值
/// </summary>
public bool IsAutoTarget { get; set; }
} }
} }
...@@ -267,6 +267,11 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -267,6 +267,11 @@ namespace FLY.Thick.FilmCasting.UI.Server
{ {
double target = this.profileParam.Target; double target = this.profileParam.Target;
if (picHistory.IsAutoTarget)
{
if (!double.IsNaN(Average))
target = Average;
}
double tolerance = this.profileParam.TolerancePercent * target; double tolerance = this.profileParam.TolerancePercent * target;
Target = target; Target = target;
......
...@@ -91,6 +91,10 @@ ...@@ -91,6 +91,10 @@
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="Y轴%显示"/> <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="Y轴%显示"/>
<CheckBox IsChecked="{Binding IsPercent}"/> <CheckBox IsChecked="{Binding IsPercent}"/>
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="Y轴自动目标值"/>
<CheckBox IsChecked="{Binding IsAutoTarget}"/>
</StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" > <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
<Button Style="{StaticResource Styles.Button.Square.Accent2}" Content="图片保存" Click="btnSavePicClick" Width="auto"/> <Button Style="{StaticResource Styles.Button.Square.Accent2}" Content="图片保存" Click="btnSavePicClick" Width="auto"/>
......
...@@ -100,6 +100,11 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -100,6 +100,11 @@ namespace FLY.Thick.FilmCasting.UI.Server
/// </summary> /// </summary>
public bool IsPercent { get; set; } = true; public bool IsPercent { get; set; } = true;
/// <summary>
/// Y轴自动目标值
/// </summary>
public bool IsAutoTarget { get; set; }
public RelayCommand OkCmd { get; private set; } public RelayCommand OkCmd { get; private set; }
private PicHistory picHistory; private PicHistory picHistory;
public PicHistory PicHistory => picHistory; public PicHistory PicHistory => picHistory;
...@@ -121,6 +126,7 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -121,6 +126,7 @@ namespace FLY.Thick.FilmCasting.UI.Server
YRangePercent = picHistory.YRangePercent; YRangePercent = picHistory.YRangePercent;
IntervalMin = picHistory.IntervalMin; IntervalMin = picHistory.IntervalMin;
IsPercent = picHistory.IsPercent; IsPercent = picHistory.IsPercent;
IsAutoTarget = picHistory.IsAutoTarget;
this.picHistory = picHistory; this.picHistory = picHistory;
} }
...@@ -184,7 +190,7 @@ namespace FLY.Thick.FilmCasting.UI.Server ...@@ -184,7 +190,7 @@ namespace FLY.Thick.FilmCasting.UI.Server
picHistory.YRangePercent = YRangePercent; picHistory.YRangePercent = YRangePercent;
picHistory.IntervalMin = IntervalMin; picHistory.IntervalMin = IntervalMin;
picHistory.IsPercent = IsPercent; picHistory.IsPercent = IsPercent;
picHistory.IsAutoTarget = IsAutoTarget;
picHistory.Save(); picHistory.Save();
MessageBox.Show($"设置完成"); MessageBox.Show($"设置完成");
......
...@@ -51,6 +51,6 @@ using System.Windows; ...@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.3.1.0")] [assembly: AssemblyVersion("7.3.2")]
[assembly: AssemblyFileVersion("7.3.1.0")] [assembly: AssemblyFileVersion("7.3.2")]
[assembly: Guid("E7D930E0-C871-4001-A31A-DC748ED5817C")] [assembly: Guid("E7D930E0-C871-4001-A31A-DC748ED5817C")]
Subproject commit 33cc7ebab0aa2e7eef031c90073940769a5d7c9b Subproject commit 64064eb49ba70a22f57160b88f62c4e398eb1e9c
...@@ -99,12 +99,11 @@ files=(\ ...@@ -99,12 +99,11 @@ files=(\
copy_to2 $src_dir $dest_dir $files copy_to2 $src_dir $dest_dir $files
# 复制 install.json 到 $install_dir_root 下
cp install.json $install_dir_root
# 修改 $install_dir_root/install.json 中的版本号 # 修改 $install_dir_root/install.json 中的版本号
# 参考 https://www.cnblogs.com/thePeaceOftheLord/p/11107737.html # 参考 https://www.cnblogs.com/thePeaceOftheLord/p/11107737.html
sed -i 's/"InstallZipVersion":""/"InstallZipVersion":"'${version}'"/g' ${install_dir_root}/install.json # 正则表达式 https://www.cnblogs.com/zd520pyx1314/p/6061339.html
sed -i 's/"InstallZipVersion":".*"/"InstallZipVersion":"'${version}'"/g' ${install_dir_root}/install.json
# 复制 $install_dir_root/install.json 到 $install_dir/FLY.Thick.FilmCasting.UI.Client/update # 复制 $install_dir_root/install.json 到 $install_dir/FLY.Thick.FilmCasting.UI.Client/update
cp ${install_dir_root}/install.json $install_dir/FLY.Thick.FilmCasting.UI.Client/update cp ${install_dir_root}/install.json $install_dir/FLY.Thick.FilmCasting.UI.Client/update
...@@ -119,5 +118,10 @@ fi ...@@ -119,5 +118,10 @@ fi
cd ${install_dir_root} cd ${install_dir_root}
"C:\Program Files (x86)\7-Zip\7z.exe" a ../${fileName7z} ./* "C:\Program Files (x86)\7-Zip\7z.exe" a ../${fileName7z} ./*
#cd .. cd ..
# 修改 filmCastingInstallZipVersionInfo.json
InstallZipVersionInfoFileName="filmCastingInstallZipVersionInfo.json"
sed -i 's/"InstallZipVersion":".*"/"InstallZipVersion":"'${version}'"/g' ${InstallZipVersionInfoFileName}
sed -i 's/"InstallZipUrl":".*"/"InstallZipUrl":"http:\/\/server.flyautomation.net:8889\/download\/'${fileName7z}'"/g' ${InstallZipVersionInfoFileName}
echo 完成 echo 完成
\ No newline at end of file
{ {
"InstallZipVersion":"7.3.1", "InstallZipVersion":"7.3.2",
"InstallZipUrl":"http://server.flyautomation.net:8889/download/流延测厚仪安装包_v7.3.1_20210920.7z" "InstallZipUrl":"http://server.flyautomation.net:8889/download/流延测厚仪安装包_v7.3.2_20211113.7z"
} }
\ No newline at end of file
{
"InstallZipVersion":"",
"NewestInstallZipVersionInfoPath":"http://server.flyautomation.net:8889/download/filmCastingInstallZipVersionInfo.json",
"DefaultNewestInstallZipPath":"D:\\测厚仪软件",
"DefaultInstallPath":"D:\\佛山市枫莱尔自动化技术有限公司\\windows",
"Items":[
{
"PackPath":"佛山市枫莱尔自动化技术有限公司\\windows\\FLY.Thick.FilmCasting.UI.Server",
"Exe":"FLY.Thick.FilmCasting.UI.Server.exe",
"Name":"流延测厚仪服务器",
"IsAutoRun":true,
"IsDefaultSelected":true
},
{
"PackPath":"佛山市枫莱尔自动化技术有限公司\\windows\\FLY.Thick.FilmCasting.UI.Client",
"Exe":"FLY.Thick.FilmCasting.UI.Client.exe",
"Name":"流延测厚仪客户端",
"IsAutoRun":true,
"Others":[
"default",
"unity",
"music",
"update"
],
"IsDefaultSelected":true
},
{
"PackPath":"佛山市枫莱尔自动化技术有限公司\\windows\\FLY.Thick.FilmCasting.UI.DbViewer",
"Exe":"FLY.Thick.FilmCasting.UI.DbViewer.exe",
"Name":"数据浏览器",
"IsAutoRun":false,
"IsDefaultSelected":true
},
{
"PackPath":"佛山市枫莱尔自动化技术有限公司\\windows\\LP3",
"Exe":"FLY.LinkProxy.UI.exe",
"Name":"LP3",
"IsAutoRun":true
}
]
}
\ No newline at end of file
流延测厚仪安装包_v7.3.2_20211113
1. 修复 流延测厚仪服务器 保存图片 很慢
2. 修复 流延测厚仪服务器 删除图片出错(不存在的文件夹)
3. 优化 AD盒参数保存在电脑。 避免AD盒 i2c 有问题。
流延测厚仪安装包_v7.3.1_20210920 流延测厚仪安装包_v7.3.1_20210920
1. 修复 ScanData数据表 EndTime 为 DateTime.Now, 但 Time 为 flyad.Now, 导致时间错乱 1. 修复 ScanData数据表 EndTime 为 DateTime.Now, 但 Time 为 flyad.Now, 导致时间错乱
2. 修复 Reflect_SeviceClient 大量数据 bug 2. 修复 Reflect_SeviceClient 大量数据 bug
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment