Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.ElectricRabbit
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.ElectricRabbit
Commits
59830c15
Commit
59830c15
authored
Dec 23, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
界面样式调整
parent
14e741dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
VIZ.ElectricRabbit.Module/MainView/View/MainView.xaml
+1
-1
VIZ.ElectricRabbit.Module/Setup/Provider/AppSetup_SerialPort.cs
+13
-5
VIZ.ElectricRabbit/App.xaml.cs
+2
-0
No files found.
VIZ.ElectricRabbit.Module/MainView/View/MainView.xaml
View file @
59830c15
...
...
@@ -65,7 +65,7 @@
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 中心值 -->
<TextBlock Text="{Binding Path=AlgorithmCenterX}" VerticalAlignment="
Center
" HorizontalAlignment="Center" Foreground="Red" FontSize="16"></TextBlock>
<TextBlock Text="{Binding Path=AlgorithmCenterX}" VerticalAlignment="
Bottom
" HorizontalAlignment="Center" Foreground="Red" FontSize="16"></TextBlock>
<!-- 箭头 -->
<fcommon:FlashingBorder IsFlashingEnabled="{Binding Path=SettingViewModel.IsFlashingEnabled}" Grid.Row="1"
...
...
VIZ.ElectricRabbit.Module/Setup/Provider/AppSetup_SerialPort.cs
View file @
59830c15
...
...
@@ -5,6 +5,7 @@ using System.IO.Ports;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Media
;
using
VIZ.ElectricRabbit.Connection
;
using
VIZ.ElectricRabbit.Domain
;
...
...
@@ -45,12 +46,19 @@ namespace VIZ.ElectricRabbit.Module
{
ConnectionManager
.
SerialPortConnection
=
new
SerialPortConnection
();
// 下行
SerialPortEndpointManager
down_endpoint_manager
=
new
SerialPortEndpointManager
(
SerialPortKeys
.
Output
,
CLIENT_OUTPUT_SERIAL_PORT
,
115200
,
Parity
.
None
,
8
,
StopBits
.
One
);
//down_endpoint_manager.PackageProvider = new GimbalPackageDownProvider(53, new byte[] { 0xA5, 0xE7 }, SerialPortKeys.Output);
ConnectionManager
.
SerialPortConnection
.
AddEndpointManager
(
down_endpoint_manager
);
try
{
SerialPortEndpointManager
down_endpoint_manager
=
new
SerialPortEndpointManager
(
SerialPortKeys
.
Output
,
CLIENT_OUTPUT_SERIAL_PORT
,
115200
,
Parity
.
None
,
8
,
StopBits
.
One
);
//down_endpoint_manager.PackageProvider = new GimbalPackageDownProvider(53, new byte[] { 0xA5, 0xE7 }, SerialPortKeys.Output);
ConnectionManager
.
SerialPortConnection
.
AddEndpointManager
(
down_endpoint_manager
);
down_endpoint_manager
.
Open
();
down_endpoint_manager
.
Open
();
}
catch
(
Exception
ex
)
{
// 串口打开失败只需要记录日志
log
.
Error
(
ex
);
}
return
true
;
}
...
...
VIZ.ElectricRabbit/App.xaml.cs
View file @
59830c15
...
...
@@ -23,6 +23,8 @@ namespace VIZ.ElectricRabbit
AppSetup
.
AppendSetup
(
new
AppSetup_InitOpenCV
());
// 初始化UDP
AppSetup
.
AppendSetup
(
new
AppSetup_InitUDP
());
// 初始化串口
AppSetup
.
AppendSetup
(
new
AppSetup_SerialPort
());
// 执行启动流程
AppSetupContext
context
=
AppSetup
.
Setup
();
...
...
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