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
b6508682
Commit
b6508682
authored
Apr 05, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 flyad7 添加 HardwareVersion 字段,用于AD盒版本标识。 v3 为伟的大AD盒。 区分IO口定义
parent
3ce2bec7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
10 deletions
+63
-10
FlyAD7.cs
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
+13
-0
IFlyAD.cs
Project.FLY.FlyADBase/FlyADBase/IFlyAD.cs
+6
-0
PgFlyAd.xaml
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgFlyAd.xaml
+12
-1
PgFlyAd.xaml.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgFlyAd.xaml.cs
+15
-8
FlyADServiceClient.cs
...LY.Thick.Base/FLY.Thick.Base/Client/FlyADServiceClient.cs
+5
-0
IFlyADService.cs
...t.FLY.Thick.Base/FLY.Thick.Base/IService/IFlyADService.cs
+2
-0
FlyAdService.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/FlyAdService.cs
+10
-1
No files found.
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
View file @
b6508682
...
...
@@ -1009,6 +1009,10 @@ namespace FlyADBase
}
}
/// <summary>
/// 硬件版本,设置的!!!
/// </summary>
public
int
HardwareVersion
{
get
;
set
;
}
=
2
;
/// <summary>
/// 脉冲
/// </summary>
...
...
@@ -1893,6 +1897,15 @@ namespace FlyADBase
public
Int16
Backup_PosOffset
=
0
;
public
UInt32
Backup_JogVelocity
=
5000
;
/// <summary>
/// 硬件版本
/// version = 1,不支持 systick
/// version = 2,支持 timeGridAdv
/// version = 3,伟的大AD盒, io口定义不一样
/// </summary>
public
int
HardwareVersion
=
2
;
public
static
string
[]
GetMemberNames
()
{
var
type
=
typeof
(
FlyAD7JsonDb
);
return
type
.
GetMembers
().
Select
(
mi
=>
mi
.
Name
).
ToArray
();
...
...
Project.FLY.FlyADBase/FlyADBase/IFlyAD.cs
View file @
b6508682
...
...
@@ -26,9 +26,15 @@ namespace FlyADBase
/// <summary>
/// AD盒版本号 版本1 没有systick;版本2 有systick;
/// 通过通讯读取
/// </summary>
int
Version
{
get
;
}
/// <summary>
/// 硬件版本,设置的!!!
/// </summary>
int
HardwareVersion
{
get
;
set
;
}
/// <summary>
/// 脉冲
/// </summary>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgFlyAd.xaml
View file @
b6508682
...
...
@@ -37,7 +37,7 @@
</StackPanel>
<local:CtMicroGage Grid.Column="1" x:Name="mircoGage" Background="Transparent" VerticalAlignment="Bottom"/>
</Grid>
<ScrollViewer
CanContentScroll="True"
PanningMode="Both" Grid.Row="1" >
<ScrollViewer PanningMode="Both" Grid.Row="1" >
<StackPanel Margin="{StaticResource ControlMargin}">
<Border Style="{StaticResource Styles.Card.Border}">
<StackPanel>
...
...
@@ -161,6 +161,17 @@
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="*1.28ms"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="AD盒版本" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="v"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding HardwareVersion}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
通讯版本:v<Run Text="{Binding Version}"/>
</TextBlock>
</StackPanel>
</StackPanel>
</WrapPanel>
<StackPanel Orientation="Horizontal" FlowDirection="RightToLeft">
<Button Style="{StaticResource Styles.Button.Square.Accent2}" Content="应用" Command="{Binding ApplyCmd}"/>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgFlyAd.xaml.cs
View file @
b6508682
...
...
@@ -73,6 +73,9 @@ namespace FLY.Thick.Base.UI
public
bool
IsJogVelocityModified
=>
JogVelocity
!=
Backup_JogVelocity
;
#
endregion
public
int
Version
{
get
;
set
;
}
public
int
HardwareVersion
{
get
;
set
;
}
#
region
initparam
public
double
Encoder1_mmpp
{
get
;
set
;
}
public
int
PosLength
{
get
;
set
;
}
...
...
@@ -130,6 +133,7 @@ namespace FLY.Thick.Base.UI
public
PgFlyAdVm
()
{
ApplyCmd
=
new
RelayCommand
(
Apply
);
Apply2Cmd
=
new
RelayCommand
(
Apply2
);
RunToCmd
=
new
RelayCommand
(
RunTo
);
BackwCmd
=
new
RelayCommand
(
Backw
);
ForwCmd
=
new
RelayCommand
(
Forw
);
...
...
@@ -144,7 +148,7 @@ namespace FLY.Thick.Base.UI
{
this
.
flyAdService
=
flyAdService
;
this
.
gageService
=
gageService
;
this
.
initParamService
=
initParamService
;
Misc
.
BindingOperations
.
SetBinding
(
this
.
flyAdService
,
nameof
(
this
.
flyAdService
.
HasCRC
),
this
,
nameof
(
HasCRC
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
flyAdService
,
nameof
(
this
.
flyAdService
.
Addr
),
()
=>
{
...
...
@@ -171,17 +175,19 @@ namespace FLY.Thick.Base.UI
Misc
.
BindingOperations
.
SetBinding
(
this
.
flyAdService
,
nameof
(
this
.
flyAdService
.
Backup_PosOffset
),
this
,
nameof
(
Backup_PosOffset
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
flyAdService
,
nameof
(
this
.
flyAdService
.
Backup_JogVelocity
),
this
,
nameof
(
Backup_JogVelocity
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
flyAdService
,
nameof
(
this
.
flyAdService
.
Verson
),
this
,
nameof
(
Version
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
flyAdService
,
nameof
(
this
.
flyAdService
.
HardwareVersion
),
this
,
nameof
(
HardwareVersion
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
Encoder1_mmpp
),
this
,
nameof
(
Encoder1_mmpp
));
Misc
.
BindingOperations
.
SetBinding
(
initParamService
,
nameof
(
initParamService
.
Speed1Scale
),
this
,
nameof
(
Speed1Scale
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
Speed1Scale
),
this
,
nameof
(
Speed1Scale
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
PosLength
),
this
,
nameof
(
PosLength
));
Misc
.
BindingOperations
.
SetBinding
(
initParamService
,
nameof
(
initParamService
.
VJOG
),
this
,
nameof
(
VJOG
));
Misc
.
BindingOperations
.
SetBinding
(
initParamService
,
nameof
(
initParamService
.
SVelocity
),
this
,
nameof
(
SVelocity
));
Misc
.
BindingOperations
.
SetBinding
(
initParamService
,
nameof
(
initParamService
.
ATime
),
this
,
nameof
(
ATime
));
Misc
.
BindingOperations
.
SetBinding
(
initParamService
,
nameof
(
initParamService
.
DTime
),
this
,
nameof
(
DTime
));
Misc
.
BindingOperations
.
SetBinding
(
initParamService
,
nameof
(
initParamService
.
HVelocity1
),
this
,
nameof
(
HVelocity1
));
Misc
.
BindingOperations
.
SetBinding
(
initParamService
,
nameof
(
initParamService
.
HVelocity2
),
this
,
nameof
(
HVelocity2
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
VJOG
),
this
,
nameof
(
VJOG
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
SVelocity
),
this
,
nameof
(
SVelocity
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
ATime
),
this
,
nameof
(
ATime
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
DTime
),
this
,
nameof
(
DTime
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
HVelocity1
),
this
,
nameof
(
HVelocity1
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
initParamService
,
nameof
(
this
.
initParamService
.
HVelocity2
),
this
,
nameof
(
HVelocity2
));
}
private
void
Apply
()
{
...
...
@@ -218,6 +224,7 @@ namespace FLY.Thick.Base.UI
flyAdService
.
Backup_PosOffset
=
this
.
PosOffset
;
flyAdService
.
Backup_JogVelocity
=
this
.
JogVelocity
;
flyAdService
.
HardwareVersion
=
HardwareVersion
;
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"应用成功"
,
null
,
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Client/FlyADServiceClient.cs
View file @
b6508682
...
...
@@ -65,6 +65,11 @@ namespace FLY.Thick.Base.Client
public
UInt32
Backup_JogVelocity
{
get
;
set
;
}
#
endregion
public
int
Verson
{
get
;
set
;
}
public
int
HardwareVersion
{
get
;
set
;
}
/// <summary>
/// 参数应用
/// </summary>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/IService/IFlyADService.cs
View file @
b6508682
...
...
@@ -40,6 +40,8 @@ namespace FLY.Thick.Base.IService
UInt32
Backup_JogVelocity
{
get
;
set
;
}
#
endregion
int
Verson
{
get
;
}
int
HardwareVersion
{
get
;
set
;
}
/// <summary>
/// 获取序列码
/// </summary>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/FlyAdService.cs
View file @
b6508682
...
...
@@ -223,7 +223,16 @@ namespace FLY.Thick.Base.Server
}
}
public
int
Verson
{
get
{
return
flyad
.
Version
;
}
}
public
int
HardwareVersion
{
get
{
return
flyad
.
HardwareVersion
;
}
set
{
flyad
.
HardwareVersion
=
value
;
}
}
FlyAD7
flyad
;
AD2ThkHandler
ad2thk
;
public
FlyAdService
()
...
...
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