Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
c5d98bb6
Commit
c5d98bb6
authored
May 07, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除多余的
parent
69b2a004
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
63 deletions
+27
-63
DynArea.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Common/DynArea.cs
+3
-43
FilmPositionDetect.cs
...LY.Thick.Base/FLY.Thick.Base/Server/FilmPositionDetect.cs
+24
-20
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base/Common/DynArea.cs
View file @
c5d98bb6
...
...
@@ -25,22 +25,9 @@ namespace FLY.Thick.Base.Common
}
#
region
BASE
/// <summary>
///
/// </summary>
public
int
Thick
{
get
{
if
(
double
.
IsNaN
(
Thk
))
{
return
Misc
.
MyBase
.
NULL_VALUE
;
}
else
{
return
(
int
)(
Thk
*
100
);
}
}
}
/// <summary>
///
/// AD 值经过 曲线转换的 测量值
/// </summary>
public
double
Thk
{
get
;
set
;
}
=
100.23
;
...
...
@@ -49,23 +36,11 @@ namespace FLY.Thick.Base.Common
/// </summary>
public
int
Position
{
get
;
set
;
}
/// <summary>
/// 分区序号
/// </summary>
public
int
BoltIndex
{
get
;
set
;
}
/// <summary>
/// 分区号
/// </summary>
public
int
BoltNo
{
get
{
return
BoltIndex
+
FirstBoltNo
;
}
}
/// <summary>
/// AD值
/// </summary>
public
int
AD
{
get
;
set
;
}
=
12345
;
/// <summary>
/// 最大AD值
/// </summary>
...
...
@@ -149,21 +124,6 @@ namespace FLY.Thick.Base.Common
#
endregion
#
region
BOLTMAP
分区信息
/// <summary>
/// 总分区数
/// </summary>
public
int
NBolts
{
get
;
set
;
}
=
50
;
/// <summary>
/// 开始分区号
/// </summary>
public
int
FirstBoltNo
{
get
;
set
;
}
#
endregion
#
region
INotifyPropertyChanged
成员
public
event
PropertyChangedEventHandler
PropertyChanged
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/FilmPositionDetect.cs
View file @
c5d98bb6
...
...
@@ -125,8 +125,7 @@ namespace FLY.Thick.Base.Server
}
else
if
(
e
.
PropertyName
==
nameof
(
flyAd
.
Position2
))
{
double
filmPos
=
Pos2ToFilmPos
(
flyAd
.
Position2
);
FilmPosition
=
filmPos
;
FilmPosition
=
Pos2ToFilmPos
(
flyAd
.
Position2
);
}
}
...
...
@@ -292,6 +291,24 @@ namespace FLY.Thick.Base.Server
#
endregion
/// <summary>
/// 让同步信号输出 1到0 1秒后, 0到1
/// </summary>
public
void
SyncSysTime
()
{
flyAd
.
SetOutputBit
(
FlyADIODefine
.
Instance
.
OutNo_Sync
,
false
);
//1秒后,复位同步信号
PollModule
.
Current
.
Poll_Config
(
PollModule
.
POLL_CONFIG
.
ADD
,
()
=>
{
flyAd
.
SetOutputBit
(
FlyADIODefine
.
Instance
.
OutNo_Sync
,
true
);
},
TimeSpan
.
FromSeconds
(
1
),
true
,
false
,
this
,
MARKNO_SYNC_HIGH
,
true
);
}
/// <summary>
/// 设置膜位置为某值
/// </summary>
...
...
@@ -302,31 +319,16 @@ namespace FLY.Thick.Base.Server
{
reset_pos2
=
flyAd
.
Position2
;
reset_filmPos
=
filmPos
;
FilmPosition
=
Pos2ToFilmPos
(
flyAd
.
Position2
);
}
else
{
RCnt
=
0
;
BaseFilmPosition
=
filmPos
;
FilmPosition
=
filmPos
;
}
FilmPosition
=
filmPos
;
}
/// <summary>
/// 让同步信号输出 1到0 1秒后, 0到1
/// </summary>
public
void
SyncSysTime
()
{
flyAd
.
SetOutputBit
(
FlyADIODefine
.
Instance
.
OutNo_Sync
,
false
);
//1秒后,复位同步信号
PollModule
.
Current
.
Poll_Config
(
PollModule
.
POLL_CONFIG
.
ADD
,
()
=>
{
flyAd
.
SetOutputBit
(
FlyADIODefine
.
Instance
.
OutNo_Sync
,
true
);
},
TimeSpan
.
FromSeconds
(
1
),
true
,
false
,
this
,
MARKNO_SYNC_HIGH
,
true
);
}
/// <summary>
/// 设置膜位置为某值; 同步服务器调用的
/// </summary>
...
...
@@ -350,13 +352,15 @@ namespace FLY.Thick.Base.Server
{
reset_pos2
=
flyAd
.
Position2
;
}
FilmPosition
=
Pos2ToFilmPos
(
flyAd
.
Position2
);
}
else
{
RCnt
=
0
;
BaseFilmPosition
=
filmPos
;
FilmPosition
=
filmPos
;
}
FilmPosition
=
filmPos
;
}
...
...
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