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
/// </summary>
public bool IsPercent { get; set; } = true;
/// <summary>
/// 自动目标值
/// </summary>
public bool IsAutoTarget { get; set; }
#endregion
#region 状态
/// <summary>
......@@ -165,10 +170,14 @@ namespace FLY.Thick.FilmCasting.UI.Server
TimeRange = TimeSpan.FromMinutes(5),
AvgRange = scanWarning.Target * scanWarning.TolerancePercent * 2
},
async (object asyncContext, object retData) =>
(object asyncContext, object retData) =>
{
//创建新线程跑下面的
Task.Factory.StartNew((obj) =>
{
Pack_GetFrameReponse reponse = retData as Pack_GetFrameReponse;
await Add(reponse);
Pack_GetFrameReponse reponse = obj as Pack_GetFrameReponse;
Add(reponse);
}, retData);
}, this);
}
......@@ -264,7 +273,7 @@ namespace FLY.Thick.FilmCasting.UI.Server
ChartToImage.SaveToJpeg(scanGraph, path);
}
public async Task Add(Pack_GetFrameReponse reponse)
void Add(Pack_GetFrameReponse reponse)
{
if (reponse.scanData == null)
return;//没有数据
......@@ -280,15 +289,13 @@ namespace FLY.Thick.FilmCasting.UI.Server
//ALL
string path = CreateCurrPath(reponse.scanData.EndTime, false);
App.Current.MainWindow.Dispatcher.Invoke(() =>
timer.Dispatcher.Invoke(() =>
{
scanGraphVm.UpdateValue(reponse, isWarning);
SavePic(path);
});
await Task.Factory.StartNew(() =>
{
try
{
if (isWarning)
......@@ -303,7 +310,6 @@ namespace FLY.Thick.FilmCasting.UI.Server
{
return;
}
});
}
......@@ -372,13 +378,48 @@ namespace FLY.Thick.FilmCasting.UI.Server
private void Keep()
{
while (dateInRootPath.Count > KeepDay)
{
try
{
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");
//检测上级文件夹,里面是空的,那就继续删除
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);
}
CurrDays = dateInRootPath.Count;
......@@ -490,5 +531,10 @@ namespace FLY.Thick.FilmCasting.UI.Server
/// Y轴%显示
/// </summary>
public bool IsPercent { get; set; } = true;
/// <summary>
/// 自动目标值
/// </summary>
public bool IsAutoTarget { get; set; }
}
}
......@@ -267,6 +267,11 @@ namespace FLY.Thick.FilmCasting.UI.Server
{
double target = this.profileParam.Target;
if (picHistory.IsAutoTarget)
{
if (!double.IsNaN(Average))
target = Average;
}
double tolerance = this.profileParam.TolerancePercent * target;
Target = target;
......
......@@ -91,6 +91,10 @@
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="Y轴%显示"/>
<CheckBox IsChecked="{Binding IsPercent}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="Y轴自动目标值"/>
<CheckBox IsChecked="{Binding IsAutoTarget}"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
<Button Style="{StaticResource Styles.Button.Square.Accent2}" Content="图片保存" Click="btnSavePicClick" Width="auto"/>
......
......@@ -100,6 +100,11 @@ namespace FLY.Thick.FilmCasting.UI.Server
/// </summary>
public bool IsPercent { get; set; } = true;
/// <summary>
/// Y轴自动目标值
/// </summary>
public bool IsAutoTarget { get; set; }
public RelayCommand OkCmd { get; private set; }
private PicHistory picHistory;
public PicHistory PicHistory => picHistory;
......@@ -121,6 +126,7 @@ namespace FLY.Thick.FilmCasting.UI.Server
YRangePercent = picHistory.YRangePercent;
IntervalMin = picHistory.IntervalMin;
IsPercent = picHistory.IsPercent;
IsAutoTarget = picHistory.IsAutoTarget;
this.picHistory = picHistory;
}
......@@ -184,7 +190,7 @@ namespace FLY.Thick.FilmCasting.UI.Server
picHistory.YRangePercent = YRangePercent;
picHistory.IntervalMin = IntervalMin;
picHistory.IsPercent = IsPercent;
picHistory.IsAutoTarget = IsAutoTarget;
picHistory.Save();
MessageBox.Show($"设置完成");
......
......@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.3.1.0")]
[assembly: AssemblyFileVersion("7.3.1.0")]
[assembly: AssemblyVersion("7.3.2")]
[assembly: AssemblyFileVersion("7.3.2")]
[assembly: Guid("E7D930E0-C871-4001-A31A-DC748ED5817C")]
Subproject commit 33cc7ebab0aa2e7eef031c90073940769a5d7c9b
Subproject commit 64064eb49ba70a22f57160b88f62c4e398eb1e9c
......@@ -99,12 +99,11 @@ files=(\
copy_to2 $src_dir $dest_dir $files
# 复制 install.json 到 $install_dir_root 下
cp install.json $install_dir_root
# 修改 $install_dir_root/install.json 中的版本号
# 参考 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
cp ${install_dir_root}/install.json $install_dir/FLY.Thick.FilmCasting.UI.Client/update
......@@ -119,5 +118,10 @@ fi
cd ${install_dir_root}
"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 完成
\ No newline at end of file
{
"InstallZipVersion":"7.3.1",
"InstallZipUrl":"http://server.flyautomation.net:8889/download/流延测厚仪安装包_v7.3.1_20210920.7z"
"InstallZipVersion":"7.3.2",
"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
1. 修复 ScanData数据表 EndTime 为 DateTime.Now, 但 Time 为 flyad.Now, 导致时间错乱
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