Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.GimbalAI
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.GimbalAI
Commits
8c9bee4e
Commit
8c9bee4e
authored
Sep 15, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中心轴控制
parent
184ebf26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
VIZ.GimbalAI.Client/App.xaml.cs
+1
-1
VIZ.GimbalAI.Connection/UDP/Gimbal/Provider/GimbalCenterAxisProvider.cs
+4
-4
VIZ.GimbalAI.Domain/Model/Gimbal/GimbalControlModel.cs
+10
-0
VIZ.GimbalAI.Module/MainView/ViewModel/MainViewModel.cs
+1
-1
No files found.
VIZ.GimbalAI.Client/App.xaml.cs
View file @
8c9bee4e
...
@@ -23,7 +23,7 @@ namespace VIZ.GimbalAI.Client
...
@@ -23,7 +23,7 @@ namespace VIZ.GimbalAI.Client
// 初始化 LiteDB
// 初始化 LiteDB
AppSetup
.
AppendSetup
(
new
AppSetup_InitLiteDB
());
AppSetup
.
AppendSetup
(
new
AppSetup_InitLiteDB
());
// 初始化中心轴
// 初始化中心轴
AppSetup
.
AppendSetup
(
new
AppSetup_InitCenterAxis
());
//
AppSetup.AppendSetup(new AppSetup_InitCenterAxis());
// 初始化 NDI
// 初始化 NDI
AppSetup
.
AppendSetup
(
new
AppSetup_InitNDI
());
AppSetup
.
AppendSetup
(
new
AppSetup_InitNDI
());
// 初始化 UDP
// 初始化 UDP
...
...
VIZ.GimbalAI.Connection/UDP/Gimbal/Provider/GimbalCenterAxisProvider.cs
View file @
8c9bee4e
...
@@ -40,13 +40,13 @@ namespace VIZ.GimbalAI.Connection
...
@@ -40,13 +40,13 @@ namespace VIZ.GimbalAI.Connection
double
x
=
ApplicationDomainEx
.
GimbalControlModel
.
TargetCenterAxisX
;
double
x
=
ApplicationDomainEx
.
GimbalControlModel
.
TargetCenterAxisX
;
double
y
=
ApplicationDomainEx
.
GimbalControlModel
.
TargetCenterAxisY
;
double
y
=
ApplicationDomainEx
.
GimbalControlModel
.
TargetCenterAxisY
;
if
(
package
.
h
!=
0
)
if
(
package
.
h
!=
0
&&
(
Math
.
Abs
(
package
.
h
)
<
10000
)
)
{
{
x
+=
(
package
.
h
>
0
?
-
1
:
1
)
*
GIMBAL_CENTER_AXIS_SPEED
;
x
+=
-
ApplicationDomainEx
.
GimbalControlModel
.
TargetKeepSymbolHelperX
.
GetSymbol
(
package
.
h
)
*
GIMBAL_CENTER_AXIS_SPEED
;
}
}
if
(
package
.
v
!=
0
)
if
(
package
.
v
!=
0
&&
(
Math
.
Abs
(
package
.
v
)
<
10000
)
)
{
{
y
+=
(
package
.
v
>
0
?
-
1
:
1
)
*
GIMBAL_CENTER_AXIS_SPEED
;
y
+=
-
ApplicationDomainEx
.
GimbalControlModel
.
TargetKeepSymbolHelperY
.
GetSymbol
(
package
.
v
)
*
GIMBAL_CENTER_AXIS_SPEED
;
}
}
x
=
MathHelper
.
Clip
(
0
,
1920
,
x
);
x
=
MathHelper
.
Clip
(
0
,
1920
,
x
);
...
...
VIZ.GimbalAI.Domain/Model/Gimbal/GimbalControlModel.cs
View file @
8c9bee4e
...
@@ -33,6 +33,16 @@ namespace VIZ.GimbalAI.Domain
...
@@ -33,6 +33,16 @@ namespace VIZ.GimbalAI.Domain
public
double
CenterAxisY
{
get
;
set
;
}
=
1080
/
2
;
public
double
CenterAxisY
{
get
;
set
;
}
=
1080
/
2
;
/// <summary>
/// <summary>
/// 目标中心轴X 保持符号辅助类
/// </summary>
public
KeepSymbolHelper
TargetKeepSymbolHelperX
{
get
;
private
set
;
}
=
new
KeepSymbolHelper
(
3
,
2
);
/// <summary>
/// 目标中心轴Y 保持符号辅助类
/// </summary>
public
KeepSymbolHelper
TargetKeepSymbolHelperY
{
get
;
private
set
;
}
=
new
KeepSymbolHelper
(
3
,
2
);
/// <summary>
/// 更新中心轴
/// 更新中心轴
/// </summary>
/// </summary>
/// <returns>中心轴是否有变化</returns>
/// <returns>中心轴是否有变化</returns>
...
...
VIZ.GimbalAI.Module/MainView/ViewModel/MainViewModel.cs
View file @
8c9bee4e
...
@@ -43,7 +43,7 @@ namespace VIZ.GimbalAI.Module
...
@@ -43,7 +43,7 @@ namespace VIZ.GimbalAI.Module
this
.
InitFPS
();
this
.
InitFPS
();
// 初始化热键
// 初始化热键
this
.
InitHotkey
();
//
this.InitHotkey();
}
}
/// <summary>
/// <summary>
...
...
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