Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
hemei
Commits
66f59723
Commit
66f59723
authored
Dec 28, 2023
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 旋转时间获取的是上上一圈时间
parent
2e0260df
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
31 deletions
+49
-31
AssemblyInfo.cs
...LY.Thick.Blowing.UI.Fix.Client/Properties/AssemblyInfo.cs
+2
-2
NLog.config
...Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/NLog.config
+5
-0
AssemblyInfo.cs
...LY.Thick.Blowing.UI.Fix.Server/Properties/AssemblyInfo.cs
+2
-2
BlowingDetect.cs
...Y.Thick.Blowing/FLY.Thick.Blowing/Server/BlowingDetect.cs
+26
-18
GM_BlowingFix.cs
...Y.Thick.Blowing/FLY.Thick.Blowing/Server/GM_BlowingFix.cs
+5
-0
LimitCellCollection.cs
...k.Blowing/FLY.Thick.Blowing/Server/LimitCellCollection.cs
+5
-5
AssemblyInfo.cs
...LY.Thick.BlowingScan.UI.Client/Properties/AssemblyInfo.cs
+2
-2
AssemblyInfo.cs
...LY.Thick.BlowingScan.UI.Server/Properties/AssemblyInfo.cs
+2
-2
No files found.
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Client/Properties/AssemblyInfo.cs
View file @
66f59723
...
...
@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.7.4.
1
")]
[assembly: AssemblyFileVersion("7.7.4.
1
")]
[assembly: AssemblyVersion("7.7.4.
2
")]
[assembly: AssemblyFileVersion("7.7.4.
2
")]
[assembly: Guid("D12087A7-EEC4-4D9F-9269-8F20324F4B04")]
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/NLog.config
View file @
66f59723
...
...
@@ -35,6 +35,10 @@
layout
=
"${longdate} ${logger} ${uppercase:${level}} ${message} ${onexception:inner=${newline} *****Error***** ${newline} ${exception:format=ToString}}"
archiveAboveSize
=
"1048576"
encoding
=
"utf-8"
/>
<
target
xsi
:
type
=
"File"
name
=
"f_blowing_debug"
fileName
=
"${basedir}/logs/blowing_debug/${shortdate}.log"
layout
=
"${longdate} ${logger} ${uppercase:${level}} ${message}"
archiveAboveSize
=
"1048576"
encoding
=
"utf-8"
/>
</
targets
>
<
rules
>
<!--
add
your
logging
rules
here
-->
...
...
@@ -46,6 +50,7 @@
<!--<
logger
name
=
"FObjSysOfClient"
minlevel
=
"Debug"
writeTo
=
"f_debug"
/>-->
<!--
name
可以用匹配-->
<
logger
name
=
"*"
minlevel
=
"Error"
writeTo
=
"f_error"
/>
<
logger
name
=
"FLY.Thick.Blowing.Server.GM_BlowingFix"
minlevel
=
"Debug"
writeTo
=
"f_blowing_debug"
/>
</
rules
>
</
nlog
>
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/Properties/AssemblyInfo.cs
View file @
66f59723
...
...
@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.8.
0
")]
[assembly: AssemblyFileVersion("7.8.
0
")]
[assembly: AssemblyVersion("7.8.
1
")]
[assembly: AssemblyFileVersion("7.8.
1
")]
[assembly: Guid("72FBA808-FA10-43BF-8504-C6E814E031E7")]
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Server/BlowingDetect.cs
View file @
66f59723
...
...
@@ -192,6 +192,7 @@ namespace FLY.Thick.Blowing.Server
/// </summary>
public
int
RSpeed
{
get
;
protected
set
;
}
/// <summary>
/// 刚开机,信号列表一个信号都没有,创造一个时间点,作为信号点
/// </summary>
...
...
@@ -266,6 +267,8 @@ namespace FLY.Thick.Blowing.Server
protected
IFlyADClientAdv
flyad
;
protected
IRotarySerivce
rotarySerivce
;
private
double
RSpeed_real
;
/// <summary>
///
/// </summary>
...
...
@@ -294,8 +297,6 @@ namespace FLY.Thick.Blowing.Server
Misc
.
BindingOperations
.
SetBinding
(
this
,
nameof
(
IsSign1Double
),
mLimitCellCollection
,
nameof
(
mLimitCellCollection
.
IsSign1Double
),
BindingOperations
.
BindingMode
.
TwoWay
);
Misc
.
BindingOperations
.
SetBinding
(
this
,
nameof
(
DefaultRPeriod
),
mLimitCellCollection
,
nameof
(
mLimitCellCollection
.
DefaultRPeriod
)
);
//输出
Misc
.
BindingOperations
.
SetBinding
(
mLimitCellCollection
,
nameof
(
mLimitCellCollection
.
RenZiJiaPeriod
),
this
,
nameof
(
RenZiJiaPeriod
));
Misc
.
BindingOperations
.
SetBinding
(
mLimitCellCollection
,
nameof
(
mLimitCellCollection
.
LimitSignTime
),
this
,
nameof
(
LimitSignTime
));
...
...
@@ -470,10 +471,18 @@ namespace FLY.Thick.Blowing.Server
{
this
.
flyad
=
flyad
;
if
(
IsPlcMode
)
{
if
(
IsPlcMode
)
{
Init_plc
();
//RenZiJiaPeriod 由PLC 的旋转速度计算得到
}
else
{
//绑定 mLimitCellCollection 计算出来的旋转时间, 到RenZiJiaPeriod
Misc
.
BindingOperations
.
SetBinding
(
mLimitCellCollection
,
nameof
(
mLimitCellCollection
.
RenZiJiaPeriod
),
this
,
nameof
(
RenZiJiaPeriod
));
}
this
.
flyad
.
IStatusChangedEvent
+=
new
FlyADBase
.
IStatusChangedEventHandler
(
flyad_IStatusChangedEvent
);
FObjBase
.
PollModule
.
Current
.
Poll_Config
(
FObjBase
.
PollModule
.
POLL_CONFIG
.
ADD
,
OnPoll
,
TimeSpan
.
FromSeconds
(
1
));
...
...
@@ -501,16 +510,17 @@ namespace FLY.Thick.Blowing.Server
});
Misc
.
BindingOperations
.
SetBinding
(
rotarySerivce
,
nameof
(
rotarySerivce
.
RPosGlobal
),
()
=>
{
GlobalRPos
=
(
int
)(
rotarySerivce
.
RPosGlobal
);
GlobalRPos
=
(
int
)
Math
.
Round
(
rotarySerivce
.
RPosGlobal
);
});
Misc
.
BindingOperations
.
SetBinding
(
rotarySerivce
,
nameof
(
rotarySerivce
.
RSpeed
),
()
=>
{
RSpeed
=
(
int
)(
rotarySerivce
.
RSpeed
);
RSpeed_real
=
Math
.
Round
(
rotarySerivce
.
RSpeed
,
1
);
RSpeed
=
(
int
)
Math
.
Round
(
RSpeed_real
);
updateRenZiJiaPeriodFromRPos
();
});
Misc
.
BindingOperations
.
SetBinding
(
rotarySerivce
,
nameof
(
rotarySerivce
.
RPosOfR
),
()
=>
{
RPosOfR
=
(
int
)(
rotarySerivce
.
RPosOfR
);
RPosOfR
=
(
int
)
Math
.
Round
(
rotarySerivce
.
RPosOfR
);
updateRenZiJiaPeriodFromRPos
();
//if (double.IsNaN(rotarySerivce.RPosAtTurnSign0))
//{
...
...
@@ -521,7 +531,7 @@ namespace FLY.Thick.Blowing.Server
Misc
.
BindingOperations
.
SetBinding
(
rotarySerivce
,
nameof
(
rotarySerivce
.
RPosAtTurnSign0
),
()
=>
{
if
(!
double
.
IsNaN
(
rotarySerivce
.
RPosAtTurnSign0
))
OrgRPos
=
(
int
)(
rotarySerivce
.
RPosAtTurnSign0
);
OrgRPos
=
(
int
)
Math
.
Round
(
rotarySerivce
.
RPosAtTurnSign0
);
//else
//{
// //刚开机随便一个值
...
...
@@ -534,9 +544,9 @@ namespace FLY.Thick.Blowing.Server
}
void
updateRenZiJiaPeriodFromRPos
()
{
if
(
Math
.
Abs
(
RSpeed
)
>
0
)
if
(
Math
.
Abs
(
RSpeed
_real
)
>
0
)
{
int
sec
=
RPosOfR
/
Math
.
Abs
(
RSpeed
);
var
sec
=
Math
.
Round
(
RPosOfR
/
Math
.
Abs
(
RSpeed_real
),
1
);
if
(
sec
>
60
*
2
&&
sec
<
60
*
30
)
{
RenZiJiaPeriod
=
TimeSpan
.
FromSeconds
(
sec
);
...
...
@@ -555,10 +565,11 @@ namespace FLY.Thick.Blowing.Server
GlobalRPos
=
GlobalRPos
};
mSignList
.
RAdd
(
sd
);
//添加sd 到 mLimitCellCollection 的limit列表, 会自动触发 update_param_for_limit(sd.Time)
mLimitCellCollection
.
AddLimit
(
sd
);
//更新其它参数
update_param_for_limit
(
sd
.
Time
);
}
else
if
(
e
.
PropertyName
==
nameof
(
IRotarySerivce
.
IsTurnSign1
))
{
...
...
@@ -570,10 +581,9 @@ namespace FLY.Thick.Blowing.Server
GlobalRPos
=
GlobalRPos
};
mSignList
.
RAdd
(
sd
);
mLimitCellCollection
.
AddLimit
(
sd
);
//
更新其它参数
update_param_for_limit
(
sd
.
Time
);
//
添加sd 到 mLimitCellCollection 的limit列表, 会自动触发 update_param_for_limit(sd.Time)
mLimitCellCollection
.
AddLimit
(
sd
);
}
}
...
...
@@ -621,11 +631,9 @@ namespace FLY.Thick.Blowing.Server
update_orgRPos
(
sd
);
//添加sd 到 mLimitCellCollection 的limit列表, 会自动触发 update_param_for_limit(sd.Time)
mLimitCellCollection
.
AddLimit
(
sd
);
//更新其它参数
update_param_for_limit
(
sd
.
Time
);
}
void
update_orgRPos
(
SignData
sd
)
...
...
@@ -794,7 +802,7 @@ namespace FLY.Thick.Blowing.Server
DateTime
now
=
DateTime
.
Now
;
DateTime
sysTime
=
flyad
.
Now
;
int
globalRPos
=
GlobalRPos
;
int
speed
=
RSpeed
;
double
speed
=
RSpeed_real
;
if
(
mRPosList
.
Count
()
>
0
)
//1秒记录一次
{
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Server/GM_BlowingFix.cs
View file @
66f59723
...
...
@@ -718,12 +718,14 @@ namespace FLY.Thick.Blowing.Server
{
mADListToDoNo
=
mADList
.
Index2No
(
0
);
mADListToDoNo_ToFilmInfo
=
mADListToDoNo
;
logger
.
Debug
(
$"PDetect_FilmInfoChangedEvent Before mADListToDoNo_ToFilmInfo=
{
mADListToDoNo_ToFilmInfo
}
"
);
}
break
;
case
ADListFastSearchIndexResult
.
Now
:
//发生在列表时间内
{
mADListToDoNo
=
mADList
.
Index2No
(
idx
);
mADListToDoNo_ToFilmInfo
=
mADListToDoNo
;
logger
.
Debug
(
$"PDetect_FilmInfoChangedEvent Now mADListToDoNo_ToFilmInfo=
{
mADListToDoNo_ToFilmInfo
}
"
);
}
break
;
case
ADListFastSearchIndexResult
.
Future
:
...
...
@@ -1177,6 +1179,7 @@ namespace FLY.Thick.Blowing.Server
FRAME_INFO
frameinfo
=
mFrameInfoList
[
i
];
if
(!
GetFilmInfoADIndex
(
frameinfo
,
out
index_start
,
out
index_end
))
{
logger
.
Debug
(
$"OnPoll_UpdateFrameInfo mFrameInfoList.Count=
{
mFrameInfoList
.
Count
}
i=
{
i
}
数据已经不存在,删除"
);
//数据已经不存在,删除
mFrameInfoList
.
RemoveAt
(
i
);
i
--;
...
...
@@ -1203,6 +1206,7 @@ namespace FLY.Thick.Blowing.Server
//条件检测
if
(
frameinfo_index
>=
mFrameInfoList
.
Count
)
//根本没数据,新建
{
logger
.
Debug
(
$"OnPoll_UpdateFrameInfo 根本没数据,新建 frameinfo_index=
{
frameinfo_index
}
mFrameInfoList.Count=
{
mFrameInfoList
.
Count
}
adcell.Time=
{
adcell
.
Time
}
"
);
frameinfo
=
new
FRAME_INFO
();
frameinfo
.
StartTime
=
adcell
.
Time
;
frameinfo
.
EndTime
=
adcell
.
Time
;
...
...
@@ -1223,6 +1227,7 @@ namespace FLY.Thick.Blowing.Server
//当为新数据, i应该>mADList.No2Index(frameinfo.NoEndAD)
//能进这里,证明是要重新计算
//清空数据,重新来过
logger
.
Debug
(
$"OnPoll_UpdateFrameInfo 清空数据,重新计算 frameinfo_index=
{
frameinfo_index
}
mFrameInfoList.Count=
{
mFrameInfoList
.
Count
}
adcell.Time=
{
adcell
.
Time
}
"
);
frameinfo
.
StartTime
=
adcell
.
Time
;
frameinfo
.
EndTime
=
adcell
.
Time
;
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Server/LimitCellCollection.cs
View file @
66f59723
...
...
@@ -593,11 +593,11 @@ namespace FLY.Thick.Blowing.Server
dt_begin
=
dt
,
dt_end
=
dt_end
};
limitCellDtBeginChanged
();
limitCellDtEndChanged
();
mLimitList
.
RAdd
(
cell
);
limitCellDtBeginChanged
();
limitCellDtEndChanged
();
AddEvent
?.
Invoke
(
cell
);
}
...
...
@@ -609,10 +609,10 @@ namespace FLY.Thick.Blowing.Server
no
=
no
,
isDouble
=
(
no
==
0
)
?
IsSign0Double
:
IsSign1Double
};
limitCellDtBeginChanged
(
);
mLimitList
.
RAdd
(
cell
);
limitCellDtBeginChanged
();
mLimitList
.
RAdd
(
cell
);
AddEvent
?.
Invoke
(
cell
);
}
}
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI.Client/Properties/AssemblyInfo.cs
View file @
66f59723
...
...
@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.8.
3
.0")]
[assembly: AssemblyFileVersion("7.8.
3
.0")]
[assembly: AssemblyVersion("7.8.
5
.0")]
[assembly: AssemblyFileVersion("7.8.
5
.0")]
[assembly: Guid("38E0D8EC-4D1C-49FF-AB08-6289294C5BD4")]
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI.Server/Properties/AssemblyInfo.cs
View file @
66f59723
...
...
@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.6.
2
.0")]
[assembly: AssemblyFileVersion("7.6.
2
.0")]
[assembly: AssemblyVersion("7.6.
3
.0")]
[assembly: AssemblyFileVersion("7.6.
3
.0")]
[assembly: Guid("A2277244-BCD4-485B-85F4-AAE96DA235B5")]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment