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
a68bc2d3
Commit
a68bc2d3
authored
Apr 29, 2025
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 GM_XXX Start重入
parent
d8770658
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
88 additions
and
29 deletions
+88
-29
GM_Backward.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Backward.cs
+8
-1
GM_Base.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Base.cs
+2
-4
GM_Forward.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Forward.cs
+9
-1
GM_GageInfo.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_GageInfo.cs
+6
-1
GM_Goto.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Goto.cs
+7
-1
GM_Origin.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Origin.cs
+8
-1
GM_Pause.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Pause.cs
+8
-1
GM_ScanCorr.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_ScanCorr.cs
+6
-1
GM_ScanMotion.cs
...ect.FLY.Thick.Base/FLY.Thick.Base/Server/GM_ScanMotion.cs
+9
-10
GM_Stop.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Stop.cs
+8
-1
IGageMode.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/IGageMode.cs
+17
-7
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Backward.cs
View file @
a68bc2d3
...
...
@@ -22,8 +22,15 @@ namespace FLY.Thick.Base.Server
}
public
override
void
Start
()
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
if
(!
IsRunning
)
return
;
//运行不起来
mFlyAD
.
SetVelocity
(
Velocity
);
mFlyAD
.
RuntoMin
();
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Base.cs
View file @
a68bc2d3
...
...
@@ -63,10 +63,8 @@ namespace FLY.Thick.Base.Server
}
public
virtual
void
Stop
()
{
FObjBase
.
PollModule
.
Current
.
Poll_Config
(
FObjBase
.
PollModule
.
POLL_CONFIG
.
REMOVE
,
onpoll_func
);
FObjBase
.
PollModule
.
Current
.
Poll_Remove
(
onpoll_func
);
IsRunning
=
false
;
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Forward.cs
View file @
a68bc2d3
...
...
@@ -21,8 +21,16 @@ namespace FLY.Thick.Base.Server
}
public
override
void
Start
()
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
if
(!
IsRunning
)
return
;
//运行不起来
mFlyAD
.
SetVelocity
(
Velocity
);
mFlyAD
.
RuntoMax
();
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_GageInfo.cs
View file @
a68bc2d3
...
...
@@ -94,9 +94,14 @@ namespace FLY.Thick.Base.Server
/// </summary>
public
override
void
Start
()
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
return
;
//运行不起来
Progress
=
0
;
DataOK
=
false
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Goto.cs
View file @
a68bc2d3
...
...
@@ -27,8 +27,14 @@ namespace FLY.Thick.Base.Server
}
public
void
Start
(
int
pos
)
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
if
(!
IsRunning
)
return
;
//运行不起来
mFlyAD
.
SetVelocity
(
Velocity
);
mFlyAD
.
Runto
(
pos
);
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Origin.cs
View file @
a68bc2d3
...
...
@@ -12,9 +12,16 @@ namespace FLY.Thick.Base.Server
public
override
void
Start
()
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
return
;
//运行不起来
mFlyAD
.
Origin
();
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Pause.cs
View file @
a68bc2d3
...
...
@@ -108,8 +108,15 @@ namespace FLY.Thick.Base.Server
}
public
override
void
Start
()
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
if
(!
IsRunning
)
return
;
//运行不起来
mState
=
STATE
.
WAIT_ORG
;
mFlyAD
.
Origin
();
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_ScanCorr.cs
View file @
a68bc2d3
...
...
@@ -141,9 +141,14 @@ namespace FLY.Thick.Base.Server
}
public
override
void
Start
()
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
return
;
//运行不起来
Progress
=
0
;
var
group
=
Groups
[
CurrGroupIndex
];
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_ScanMotion.cs
View file @
a68bc2d3
...
...
@@ -9,6 +9,7 @@ using FlyADBase;
using
FLY.Thick.Base.Common
;
using
System.Diagnostics
;
using
FLY.OBJComponents.Server
;
using
NLog
;
namespace
FLY.Thick.Base.Server
{
...
...
@@ -177,8 +178,8 @@ namespace FLY.Thick.Base.Server
}
else
{
warningSystem
.
Update
(
ERRNOs
.
ERRNO_SCAN_FATAL
,
accessory
:
"ManualStop"
);
Stop
();
warningSystem
.
Update
(
ERRNOs
.
ERRNO_SCAN_FATAL
,
accessory
:
"ManualStop"
);
Stop
();
}
return
false
;
}
...
...
@@ -236,10 +237,10 @@ namespace FLY.Thick.Base.Server
}
else
{
warningSystem
.
Update
(
ERRNOs
.
ERRNO_SCAN_FATAL
,
accessory
:
"ManualStopAtHome"
);
warningSystem
.
Update
(
ERRNOs
.
ERRNO_SCAN_FATAL
,
accessory
:
"ManualStopAtHome"
);
Stop
();
}
}
break
;
}
break
;
}
return
false
;
}
...
...
@@ -296,7 +297,7 @@ namespace FLY.Thick.Base.Server
{
if
(!
WaitFinish
())
break
;
FlushAD
(
DIRECTION
.
FORWARD
);
state
=
CTRLST
.
FORWAIT_2
;
}
...
...
@@ -364,7 +365,7 @@ namespace FLY.Thick.Base.Server
{
if
(!
WaitFinish
())
break
;
FlushAD
(
DIRECTION
.
BACKWARD
);
state
=
CTRLST
.
BACKWAIT_2
;
}
...
...
@@ -426,7 +427,7 @@ namespace FLY.Thick.Base.Server
{
if
(!
WaitFinish
())
break
;
FlushAD
(
DIRECTION
.
FORWARD
);
state
=
CTRLST
.
SCAN_BACKW
;
}
...
...
@@ -443,7 +444,7 @@ namespace FLY.Thick.Base.Server
{
if
(!
WaitFinish
())
break
;
FlushAD
(
DIRECTION
.
BACKWARD
);
state
=
CTRLST
.
INIT
;
}
...
...
@@ -491,6 +492,4 @@ namespace FLY.Thick.Base.Server
}
}
}
}
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GM_Stop.cs
View file @
a68bc2d3
...
...
@@ -16,8 +16,15 @@ namespace FLY.Thick.Base.Server
}
public
override
void
Start
()
{
if
(
IsRunning
)
return
;
//已经在运行
//注册onPoll定时运行
base
.
Start
();
if
(!
IsRunning
)
return
;
if
(!
IsRunning
)
return
;
//运行不起来
mFlyAD
.
Stop
();
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/IGageMode.cs
View file @
a68bc2d3
...
...
@@ -54,13 +54,15 @@ namespace FLY.Thick.Base.Server
/// </summary>
public
class
GageModeManager
:
INotifyPropertyChanged
{
public
event
PropertyChangedEventHandler
PropertyChanged
;
/// <summary>
/// 当前动作模式
/// </summary>
public
CTRL_STATE
State
{
get
;
set
;
}
=
CTRL_STATE
.
FIX
;
/// <summary>
/// 第1个GM,就是默认值
/// 第1个GM,就是默认值
; 没有任何GM运行,就会启动第1个GM
/// </summary>
List
<
IGageMode
>
GMs
=
new
List
<
IGageMode
>();
...
...
@@ -90,21 +92,29 @@ namespace FLY.Thick.Base.Server
{
IGageMode
gm
=
sender
as
IGageMode
;
if
(
e
.
PropertyName
==
"IsRunning"
)
if
(
e
.
PropertyName
==
nameof
(
gm
.
IsRunning
)
)
{
if
(
gm
.
IsRunning
==
true
)
{
//GM 启动
if
(
GMofRunning
!=
null
)
//其中一个GM启动,停止上一次运行的GM
if
(
GMofRunning
!=
null
)
{
//GM启动,停止上一次运行的GM
//必须先注册 当前运行 GMofRunning 为 新的GM
//再停止上一个 GM
//因为 GM.Stop 会触发 下面的停止事件, 插入 GMs[0] 动作
IGageMode
g
=
GMofRunning
;
GMofRunning
=
gm
;
g
.
Stop
();
}
else
{
GMofRunning
=
gm
;
//没有上一个GM
GMofRunning
=
gm
;
}
//更新当前状态
State
=
gm
.
GMState
;
...
...
@@ -112,7 +122,7 @@ namespace FLY.Thick.Base.Server
else
{
//GM 停止
if
(
gm
==
GMofRunning
)
if
(
gm
==
GMofRunning
)
//就是当前在运行的GM
{
GMofRunning
=
null
;
//当前没有GM在运行
...
...
@@ -122,6 +132,6 @@ namespace FLY.Thick.Base.Server
}
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
}
}
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