Commit 59830c15 by liulongfei

界面样式调整

parent 14e741dd
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions> </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" <fcommon:FlashingBorder IsFlashingEnabled="{Binding Path=SettingViewModel.IsFlashingEnabled}" Grid.Row="1"
......
...@@ -5,6 +5,7 @@ using System.IO.Ports; ...@@ -5,6 +5,7 @@ using System.IO.Ports;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using VIZ.ElectricRabbit.Connection; using VIZ.ElectricRabbit.Connection;
using VIZ.ElectricRabbit.Domain; using VIZ.ElectricRabbit.Domain;
...@@ -45,12 +46,19 @@ namespace VIZ.ElectricRabbit.Module ...@@ -45,12 +46,19 @@ namespace VIZ.ElectricRabbit.Module
{ {
ConnectionManager.SerialPortConnection = new SerialPortConnection(); ConnectionManager.SerialPortConnection = new SerialPortConnection();
// 下行 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); SerialPortEndpointManager down_endpoint_manager = new SerialPortEndpointManager(SerialPortKeys.Output, CLIENT_OUTPUT_SERIAL_PORT, 115200, Parity.None, 8, StopBits.One);
ConnectionManager.SerialPortConnection.AddEndpointManager(down_endpoint_manager); //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; return true;
} }
......
...@@ -23,6 +23,8 @@ namespace VIZ.ElectricRabbit ...@@ -23,6 +23,8 @@ namespace VIZ.ElectricRabbit
AppSetup.AppendSetup(new AppSetup_InitOpenCV()); AppSetup.AppendSetup(new AppSetup_InitOpenCV());
// 初始化UDP // 初始化UDP
AppSetup.AppendSetup(new AppSetup_InitUDP()); AppSetup.AppendSetup(new AppSetup_InitUDP());
// 初始化串口
AppSetup.AppendSetup(new AppSetup_SerialPort());
// 执行启动流程 // 执行启动流程
AppSetupContext context = AppSetup.Setup(); AppSetupContext context = AppSetup.Setup();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment