Commit 14e741dd by liulongfei

串口输出

parent 1fe1e67a
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.ElectricRabbit.Connection
{
/// <summary>
/// 云台数据包序列化
/// </summary>
public interface IOutputPackageSerialize
{
/// <summary>
/// 将对象转化为二进制数据
/// </summary>
/// <returns>二进制数据</returns>
byte[] ToBuffer();
/// <summary>
/// 从二进制数据中获取数据
/// </summary>
/// <param name="buffer">二进制数据</param>
void FromBuffer(byte[] buffer);
/// <summary>
/// 获取校验值
/// </summary>
/// <returns>是否通过校验</returns>
byte GetCheckValue();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.ElectricRabbit.Connection
{
/// <summary>
/// 云台数据包基类
/// </summary>
public abstract class OutputPackageBase : IOutputPackageSerialize
{
/// <summary>
/// 时间 yyyy-MM-dd HH:mm:ss fff
/// </summary>
public string DateTime { get; set; }
/// <summary>
/// 获取一个字节数据的正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <returns>当前位序</returns>
protected byte GetPN_1(byte[] buffer, int index)
{
return (byte)((buffer[index] & 0b10000000) >> 7);
}
/// <summary>
/// 获取一个字节数据的值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected byte GetValue_1(byte[] buffer, int index)
{
return (byte)(buffer[index] & 0b01111111);
}
/// <summary>
/// 获取两个字节数据的额正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <returns>当前位序</returns>
protected byte GetPN_2(byte[] buffer, int index)
{
return (byte)((buffer[index + 1] & 0b10000000) >> 7);
}
/// <summary>
/// 获取两个字节数据的值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected UInt16 GetValue_2(byte[] buffer, int index)
{
return (UInt16)(buffer[index] + ((buffer[index + 1] & 0b01111111) << 8));
}
/// <summary>
/// 获取两个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected UInt16 GetValue_2_NoPN(byte[] buffer, int index)
{
return (UInt16)(buffer[index] + (buffer[index + 1] << 8));
}
/// <summary>
/// 获取两个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected Int16 GetValue_2_NoPN2(byte[] buffer, int index)
{
return (Int16)(buffer[index] + (buffer[index + 1] << 8));
}
/// <summary>
/// 获取四个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected UInt32 GetValue_4_NoPN(byte[] buffer, int index)
{
return (UInt32)(buffer[index] + (buffer[index + 1] << 8) + (buffer[index + 2] << 16) + (buffer[index + 3] << 24));
}
/// <summary>
/// 获取四个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected Int32 GetValue_4_NoPN2(byte[] buffer, int index)
{
return (Int32)(buffer[index] + (buffer[index + 1] << 8) + (buffer[index + 2] << 16) + (buffer[index + 3] << 24));
}
/// <summary>
/// 获取1个字节数据
/// </summary>
/// <param name="pn">符号位</param>
/// <param name="value">值</param>
/// <returns>字节数据</returns>
protected byte GetBuffer_1(byte pn, byte value)
{
return (byte)(((UInt16)pn << 7) + value);
}
/// <summary>
/// 获取2个字节数据的低位
/// </summary>
/// <param name="pn">符号</param>
/// <param name="value">值</param>
/// <returns>低位字节</returns>
protected byte GetBuffer_2_low(byte pn, UInt16 value)
{
return (byte)((value + (pn << 15)) & 0b0000000011111111);
}
/// <summary>
/// 获取2个字节数据的高位
/// </summary>
/// <param name="pn">符号</param>
/// <param name="value">值</param>
/// <returns>高位字节</returns>
protected byte GetBuffer_2_heigh(byte pn, UInt16 value)
{
return (byte)(((value + (pn << 15)) & 0b1111111100000000) >> 8);
}
/// <summary>
/// 获取2个字节数据的低位
/// </summary>
/// <param name="value">值</param>
/// <returns>低位字节</returns>
protected byte GetBuffer_2_low(UInt16 value)
{
return (byte)(value & 0b0000000011111111);
}
/// <summary>
/// 获取2个字节数据的高位
/// </summary>
/// <param name="value">值</param>
/// <returns>高位数据</returns>
protected byte GetBuffer_2_heigh(UInt16 value)
{
return (byte)((value & 0b1111111100000000) >> 8);
}
/// <summary>
/// 获取2个字节数据的低位
/// </summary>
/// <param name="value">值</param>
/// <returns>低位字节</returns>
protected byte GetBuffer_2_low(Int16 value)
{
return (byte)(value & 0b0000000011111111);
}
/// <summary>
/// 获取2个字节数据的高位
/// </summary>
/// <param name="value">值</param>
/// <returns>高位数据</returns>
protected byte GetBuffer_2_heigh(Int16 value)
{
return (byte)((value & 0b1111111100000000) >> 8);
}
/// <summary>
/// 获取4个字节数据
/// </summary>
/// <param name="value">值</param>
/// <returns>字节数据</returns>
protected byte[] GetBuffer_4(UInt32 value)
{
// 00000000
// 11111111
byte[] result = new byte[4];
result[0] = (byte)(value & 0b00000000000000000000000011111111);
result[1] = (byte)((value & 0b00000000000000001111111100000000) >> 8);
result[2] = (byte)((value & 0b00000000111111110000000000000000) >> 16);
result[3] = (byte)((value & 0b11111111000000000000000000000000) >> 24);
return result;
}
/// <summary>
/// 获取4个字节数据
/// </summary>
/// <param name="value">值</param>
/// <returns>字节数据</returns>
protected byte[] GetBuffer_4(Int32 value)
{
// 00000000
// 11111111
byte[] result = new byte[4];
result[0] = (byte)(value & 0b00000000000000000000000011111111);
result[1] = (byte)((value & 0b00000000000000001111111100000000) >> 8);
result[2] = (byte)((value & 0b00000000111111110000000000000000) >> 16);
result[3] = (byte)((value & 0b11111111000000000000000000000000) >> 24);
return result;
}
/// <summary>
/// 获取带PN的值
/// </summary>
/// <param name="pn">符号位</param>
/// <param name="value">值</param>
/// <returns>带PN的值</returns>
protected UInt16 GetValueWithPN(byte pn, byte value)
{
return (UInt16)((pn << 7) + value);
}
/// <summary>
/// 获取带PN的值
/// </summary>
/// <param name="pn">符号位</param>
/// <param name="value">值</param>
/// <returns>带PN的值</returns>
protected UInt16 GetValueWithPN(byte pn, UInt16 value)
{
return (UInt16)(value + ((UInt16)(pn) << 15));
}
/// <summary>
/// 将对象转化为二进制数据
/// </summary>
/// <returns>二进制数据</returns>
public abstract byte[] ToBuffer();
/// <summary>
/// 从二进制数据中获取数据
/// </summary>
/// <param name="buffer">二进制数据</param>
public abstract void FromBuffer(byte[] buffer);
/// <summary>
/// 获取校验值
/// </summary>
/// <returns>是否通过校验</returns>
public abstract byte GetCheckValue();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI;
using VIZ.ElectricRabbit.Domain;
using VIZ.Framework.Connection;
namespace VIZ.ElectricRabbit.Connection
{
/// <summary>
/// 输出数据
/// </summary>
public class OutputPackage_data : OutputPackageBase
{
/// <summary>
/// 同步帧头 固定值 0xA5
/// </summary>
[ConnBitLength(8)]
public byte SyncHead_1 { get; set; }
/// <summary>
/// 同步帧头 固定值 0x2F
/// </summary>
[ConnBitLength(8)]
public byte SyncHead_2 { get; set; }
/// <summary>
/// 状态字
/// <see cref="OutputPackageCommands"/>
/// </summary>
[ConnBitLength(8)]
public byte Command { get; set; }
/// <summary>
/// 俯仰角度值
/// </summary>
[ConnBitLength(16)]
public Int16 Vertical { get; set; }
/// <summary>
/// 方位角度值
/// </summary>
[ConnBitLength(16)]
public Int16 Horizontal { get; set; }
/// <summary>
/// 横滚角度值
/// </summary>
[ConnBitLength(16)]
public Int16 Roll { get; set; }
/// <summary>
/// 变焦值
/// </summary>
[ConnBitLength(16)]
public UInt16 Zoom { get; set; }
/// <summary>
/// 光圈值
/// </summary>
[ConnBitLength(16)]
public UInt16 Aperture { get; set; }
/// <summary>
/// 聚焦值
/// </summary>
[ConnBitLength(16)]
public UInt16 Focus { get; set; }
/// <summary>
/// 辅助控制指令 方向 0 - 右, 1 左
/// </summary>
[ConnBitLength(1)]
public byte HelpCommand_PN { get; set; }
/// <summary>
/// 辅助控制指令
/// </summary>
[ConnBitLength(15)]
public UInt16 HelpCommand { get; set; }
/// <summary>
/// 心跳指令
/// </summary>
[ConnBitLength(8)]
public byte Heart { get; set; }
/// <summary>
/// 校验和
/// (序号1+……+序号52)&0xFF
/// </summary>
[ConnBitLength(8)]
public byte Check { get; set; }
/// <summary>
/// 将对象转化为二进制数据
/// </summary>
/// <returns>二进制数据</returns>
public override byte[] ToBuffer()
{
byte[] buffer = new byte[53];
int index = 0;
// 同步帧头 1
buffer[index++] = this.SyncHead_1;
// 同步帧头 2
buffer[index++] = this.SyncHead_2;
// 命令字
buffer[index++] = this.Command;
// 俯仰
buffer[index++] = this.GetBuffer_2_low(this.Vertical);
buffer[index++] = this.GetBuffer_2_heigh(this.Vertical);
// 方位
buffer[index++] = this.GetBuffer_2_low(this.Horizontal);
buffer[index++] = this.GetBuffer_2_heigh(this.Horizontal);
// 横滚
buffer[index++] = this.GetBuffer_2_low(this.Roll);
buffer[index++] = this.GetBuffer_2_heigh(this.Roll);
// 变焦
buffer[index++] = this.GetBuffer_2_low(this.Zoom);
buffer[index++] = this.GetBuffer_2_heigh(this.Zoom);
// 光圈
buffer[index++] = this.GetBuffer_2_low(this.Aperture);
buffer[index++] = this.GetBuffer_2_heigh(this.Aperture);
// 聚焦
buffer[index++] = this.GetBuffer_2_low(this.Focus);
buffer[index++] = this.GetBuffer_2_heigh(this.Focus);
// 辅助控制指令
buffer[index++] = this.GetBuffer_2_low(this.HelpCommand_PN, this.HelpCommand);
buffer[index++] = this.GetBuffer_2_heigh(this.HelpCommand_PN, this.HelpCommand);
// 备用
index += 30;
// 心跳
buffer[index++] = this.Heart;
// 校验值
buffer[index++] = this.Check;
return buffer;
}
/// <summary>
/// 从二进制数据中获取数据
/// </summary>
/// <param name="buffer">二进制数据</param>
public override void FromBuffer(byte[] buffer)
{
int index = 0;
// 同步帧头 1
this.SyncHead_1 = buffer[index++];
// 同步帧头 2
this.SyncHead_2 = buffer[index++];
// 命令字
this.Command = buffer[index++];
// 俯仰
this.Vertical = this.GetValue_2_NoPN2(buffer, index);
index += 2;
// 方位
this.Horizontal = this.GetValue_2_NoPN2(buffer, index);
index += 2;
// 横滚
this.Roll = this.GetValue_2_NoPN2(buffer, index);
index += 2;
// 变焦
this.Zoom = this.GetValue_2_NoPN(buffer, index);
index += 2;
// 光圈
this.Aperture = this.GetValue_2_NoPN(buffer, index);
index += 2;
// 聚焦
this.Focus = this.GetValue_2_NoPN(buffer, index);
index += 2;
// 辅助控制指令
this.HelpCommand_PN = this.GetPN_2(buffer, index);
this.HelpCommand = this.GetValue_2(buffer, index);
index += 2;
// 备用
index += 30;
// 心跳
this.Heart = buffer[index++];
// 校验值
this.Check = buffer[index++];
}
/// <summary>
/// 获取校验值
/// </summary>
/// <returns>是否通过校验</returns>
public override byte GetCheckValue()
{
byte[] buffer = this.ToBuffer();
long sum = 0;
for (int i = 0; i < buffer.Length - 1; i++)
{
sum += buffer[i];
}
return (byte)(sum & 0xFF);
}
}
}
...@@ -31,6 +31,7 @@ namespace VIZ.ElectricRabbit.Connection ...@@ -31,6 +31,7 @@ namespace VIZ.ElectricRabbit.Connection
AlgorithmDectectMessage msg = new AlgorithmDectectMessage(); AlgorithmDectectMessage msg = new AlgorithmDectectMessage();
msg.target_bbox = package.target_bbox; msg.target_bbox = package.target_bbox;
msg.center_x = package.center_x;
ApplicationDomainEx.MessageManager.Send(msg); ApplicationDomainEx.MessageManager.Send(msg);
} }
......
...@@ -21,5 +21,10 @@ namespace VIZ.ElectricRabbit.Connection ...@@ -21,5 +21,10 @@ namespace VIZ.ElectricRabbit.Connection
/// 目标框(左上角x,y,右下角x,y) /// 目标框(左上角x,y,右下角x,y)
/// </summary> /// </summary>
public List<int> target_bbox { get; set; } public List<int> target_bbox { get; set; }
/// <summary>
/// 目标中心
/// </summary>
public double center_x { get; set; }
} }
} }
...@@ -68,6 +68,9 @@ ...@@ -68,6 +68,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SerialPort\Output\Signal\IOutputPackageSerialize.cs" />
<Compile Include="SerialPort\Output\Signal\OutputPackageBase.cs" />
<Compile Include="SerialPort\Output\Signal\Send\OutputPackage_data.cs" />
<Compile Include="UDP\Algorithm\AlgorithmPackageBase.cs" /> <Compile Include="UDP\Algorithm\AlgorithmPackageBase.cs" />
<Compile Include="UDP\Algorithm\AlgorithmPackageProvider.cs" /> <Compile Include="UDP\Algorithm\AlgorithmPackageProvider.cs" />
<Compile Include="UDP\Algorithm\Enum\AlgorithmPackageSignal.cs" /> <Compile Include="UDP\Algorithm\Enum\AlgorithmPackageSignal.cs" />
...@@ -109,6 +112,7 @@ ...@@ -109,6 +112,7 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="SerialPort\Output\Provider\" />
<Folder Include="UDP\Algorithm\Info\" /> <Folder Include="UDP\Algorithm\Info\" />
<Folder Include="UDP\Algorithm\Sender\" /> <Folder Include="UDP\Algorithm\Sender\" />
<Folder Include="UDP\Algorithm\Signal\Send\" /> <Folder Include="UDP\Algorithm\Signal\Send\" />
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.ElectricRabbit.Domain
{
/// <summary>
/// 输出命令
/// </summary>
public enum OutputPackageCommands : byte
{
/// <summary>
/// 无指令
/// </summary>
[Description("无指令")]
None = 0x00,
/// <summary>
/// 有指令
/// </summary>
[Description("有指令")]
Command = 0x01,
/// <summary>
/// 复位
/// </summary>
[Description("复位")]
Reset = 0x02
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.ElectricRabbit.Domain
{
/// <summary>
/// 串口键
/// </summary>
public class SerialPortKeys
{
/// <summary>
/// 输出
/// </summary>
public const string Output = "Output";
}
}
...@@ -15,5 +15,10 @@ namespace VIZ.ElectricRabbit.Domain ...@@ -15,5 +15,10 @@ namespace VIZ.ElectricRabbit.Domain
/// 目标框 /// 目标框
/// </summary> /// </summary>
public List<int> target_bbox { get; set; } public List<int> target_bbox { get; set; }
/// <summary>
/// 目标中心
/// </summary>
public double center_x { get; set; }
} }
} }
...@@ -69,6 +69,8 @@ ...@@ -69,6 +69,8 @@
<ItemGroup> <ItemGroup>
<Compile Include="ApplicationConstant.cs" /> <Compile Include="ApplicationConstant.cs" />
<Compile Include="ApplicationDomainEx.cs" /> <Compile Include="ApplicationDomainEx.cs" />
<Compile Include="Enum\OutputPackageCommands.cs" />
<Compile Include="Enum\SerialPortKeys.cs" />
<Compile Include="Info\ClientConfigInfo.cs" /> <Compile Include="Info\ClientConfigInfo.cs" />
<Compile Include="Message\Algorithm\AlgorithmDectectMessage.cs" /> <Compile Include="Message\Algorithm\AlgorithmDectectMessage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Common;
namespace VIZ.ElectricRabbit.Module
{
/// <summary>
/// 输出支持
/// </summary>
public interface IOutputSupport
{
/// <summary>
/// 算法偏差值
/// </summary>
double AlgorithmDifferenceValue { get; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.ElectricRabbit.Connection;
using VIZ.ElectricRabbit.Domain;
using VIZ.Framework.Connection;
using VIZ.Framework.Core;
namespace VIZ.ElectricRabbit.Module
{
/// <summary>
/// 输出控制器
/// </summary>
public class OutputController : IDisposable
{
/// <summary>
/// 发送间隔,单位:毫秒
/// </summary>
public const int SEND_WAIT = 10;
/// <summary>
/// 输出控制器
/// </summary>
/// <param name="support">支持</param>
public OutputController(IOutputSupport support)
{
this.Support = support;
ApplicationDomainEx.ObjectPoolManager.Add("VIZ.ElectricRabbit.Module.OutputController", this);
}
/// <summary>
/// 支持
/// </summary>
public IOutputSupport Support { get; private set; }
/// <summary>
/// 任务信息
/// </summary>
private TaskInfo taskInfo;
/// <summary>
/// 任务
/// </summary>
private Task task;
/// <summary>
/// 心跳指令
/// </summary>
private int heart;
/// <summary>
/// 启动输出控制
/// </summary>
public void Start()
{
this.taskInfo = new TaskInfo();
this.task = Task.Run(this.Execute);
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
if (this.taskInfo != null)
{
this.taskInfo.IsCancel = true;
}
this.taskInfo = null;
this.task = null;
}
/// <summary>
/// 执行
/// </summary>
private void Execute()
{
TaskInfo taskInfo = this.taskInfo;
while (!taskInfo.IsCancel)
{
if (ConnectionManager.SerialPortConnection == null)
{
System.Threading.Thread.Sleep(SEND_WAIT);
continue;
}
SerialPortEndpointManager endpoint = ConnectionManager.SerialPortConnection.GetEndpointManager(SerialPortKeys.Output);
if (endpoint == null)
{
System.Threading.Thread.Sleep(SEND_WAIT);
continue;
}
OutputPackage_data package = new OutputPackage_data();
package.SyncHead_1 = 0xA5;
package.SyncHead_2 = 0x2F;
package.HelpCommand_PN = this.Support.AlgorithmDifferenceValue < 0 ? (byte)1 : (byte)0;
package.HelpCommand = (UInt16)Math.Abs(this.Support.AlgorithmDifferenceValue);
package.Heart = (byte)this.heart;
this.heart++;
if (this.heart > 255)
{
this.heart = 0;
}
endpoint.Send(package.ToBuffer());
System.Threading.Thread.Sleep(SEND_WAIT);
}
}
}
}
...@@ -59,15 +59,25 @@ ...@@ -59,15 +59,25 @@
<ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 提示区域 --> <!-- 提示区域 -->
<fcommon:FlashingBorder IsFlashingEnabled="{Binding Path=SettingViewModel.IsFlashingEnabled}" <Grid>
FlashingInterval="{Binding Path=SettingViewModel.FlashingInterval,Converter={StaticResource Double2TimeSpanConverter}}"> <Grid.RowDefinitions>
<common:ArrowShape ArrowMaxHeight="120" ArrowMaxWidth="120" ArrowMinHeigh="60" ArrowMinWidth="60" <RowDefinition Height="30"></RowDefinition>
RectangleMaxHeigh="40" RectangleMaxWidth="1200" RectangleMinHeigh="5" RectangleMinWidth="20" <RowDefinition Height="*"></RowDefinition>
SafeRectangleWidth="400" RectangleHeightProportion="0.4" </Grid.RowDefinitions>
DifferenceSafeValue="{Binding SettingViewModel.SafeDistance}" DifferenceMaxValue="1920" <!-- 中心值 -->
DifferenceValue="{Binding DifferenceValue,Mode=OneWay}" <TextBlock Text="{Binding Path=AlgorithmCenterX}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" FontSize="16"></TextBlock>
LeftBrush="#066FA5" RightBrush="#F70044" SafeBrush="#11CD86"></common:ArrowShape>
</fcommon:FlashingBorder> <!-- 箭头 -->
<fcommon:FlashingBorder IsFlashingEnabled="{Binding Path=SettingViewModel.IsFlashingEnabled}" Grid.Row="1"
FlashingInterval="{Binding Path=SettingViewModel.FlashingInterval,Converter={StaticResource Double2TimeSpanConverter}}">
<common:ArrowShape ArrowMaxHeight="120" ArrowMaxWidth="120" ArrowMinHeigh="60" ArrowMinWidth="60"
RectangleMaxHeigh="40" RectangleMaxWidth="1200" RectangleMinHeigh="5" RectangleMinWidth="20"
SafeRectangleWidth="400" RectangleHeightProportion="0.4"
DifferenceSafeValue="{Binding SettingViewModel.SafeDistance}" DifferenceMaxValue="1920"
DifferenceValue="{Binding DifferenceValue,Mode=OneWay}"
LeftBrush="#066FA5" RightBrush="#F70044" SafeBrush="#11CD86"></common:ArrowShape>
</fcommon:FlashingBorder>
</Grid>
<fcommon:DebugBorder HorizontalAlignment="Left" VerticalAlignment="Center"> <fcommon:DebugBorder HorizontalAlignment="Left" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="算法FPS:" Foreground="Red" FontSize="20" Margin="10,0,10,0"></TextBlock> <TextBlock Text="算法FPS:" Foreground="Red" FontSize="20" Margin="10,0,10,0"></TextBlock>
......
...@@ -14,13 +14,16 @@ namespace VIZ.ElectricRabbit.Module ...@@ -14,13 +14,16 @@ namespace VIZ.ElectricRabbit.Module
/// <summary> /// <summary>
/// 主视图模型 /// 主视图模型
/// </summary> /// </summary>
public class MainViewModel : ViewModelBase public class MainViewModel : ViewModelBase, IOutputSupport
{ {
public MainViewModel() public MainViewModel()
{ {
// 初始化命令 // 初始化命令
this.InitCommand(); this.InitCommand();
// 初始化控制器
this.InitController();
// 初始化FPS // 初始化FPS
this.InitFPS(); this.InitFPS();
...@@ -56,6 +59,25 @@ namespace VIZ.ElectricRabbit.Module ...@@ -56,6 +59,25 @@ namespace VIZ.ElectricRabbit.Module
this.AlgorithmFPS.Start(); this.AlgorithmFPS.Start();
} }
/// <summary>
/// 初始化控制器
/// </summary>
private void InitController()
{
this.outputController = new OutputController(this);
this.outputController.Start();
}
// ================================================================================
// Field
// ================================================================================
/// <summary>
/// 输出控制器
/// </summary>
private OutputController outputController;
// ================================================================================ // ================================================================================
// Property // Property
// ================================================================================ // ================================================================================
...@@ -102,6 +124,20 @@ namespace VIZ.ElectricRabbit.Module ...@@ -102,6 +124,20 @@ namespace VIZ.ElectricRabbit.Module
#endregion #endregion
#region AlgorithmDifferenceValue -- 算法目标框与中心轴的偏差
private double algorithmDifferenceValue;
/// <summary>
/// 算法目标框与中心轴的偏差
/// </summary>
public double AlgorithmDifferenceValue
{
get { return algorithmDifferenceValue; }
set { algorithmDifferenceValue = value; this.RaisePropertySaveChanged(nameof(AlgorithmDifferenceValue)); }
}
#endregion
#region AlgorithmFPS -- 算法FPS #region AlgorithmFPS -- 算法FPS
private FPSHelper algorithmFPS; private FPSHelper algorithmFPS;
...@@ -116,6 +152,20 @@ namespace VIZ.ElectricRabbit.Module ...@@ -116,6 +152,20 @@ namespace VIZ.ElectricRabbit.Module
#endregion #endregion
#region AlgorithmCenterX -- 算法中心值
private double algorithmCenterX;
/// <summary>
/// 算法中心值
/// </summary>
public double AlgorithmCenterX
{
get { return algorithmCenterX; }
set { algorithmCenterX = value; this.RaisePropertySaveChanged(nameof(AlgorithmCenterX)); }
}
#endregion
// ================================================================================ // ================================================================================
// Command // Command
// ================================================================================ // ================================================================================
...@@ -271,6 +321,9 @@ namespace VIZ.ElectricRabbit.Module ...@@ -271,6 +321,9 @@ namespace VIZ.ElectricRabbit.Module
{ {
view.video.ClearTrackingBox(); view.video.ClearTrackingBox();
// 更新FPS
this.AlgorithmFPS.CalcFps();
return; return;
} }
...@@ -294,6 +347,8 @@ namespace VIZ.ElectricRabbit.Module ...@@ -294,6 +347,8 @@ namespace VIZ.ElectricRabbit.Module
// 更新差值 // 更新差值
double center = left + (right - left) / 2d; double center = left + (right - left) / 2d;
this.DifferenceValue = center - this.SettingViewModel.SafeAxis; this.DifferenceValue = center - this.SettingViewModel.SafeAxis;
this.AlgorithmCenterX = msg.center_x;
this.AlgorithmDifferenceValue = center - this.AlgorithmCenterX;
// 更新FPS // 更新FPS
this.AlgorithmFPS.CalcFps(); this.AlgorithmFPS.CalcFps();
......
using log4net;
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using VIZ.ElectricRabbit.Connection;
using VIZ.ElectricRabbit.Domain;
using VIZ.ElectricRabbit.Storage;
using VIZ.Framework.Connection;
using VIZ.Framework.Core;
using VIZ.Framework.Domain;
using VIZ.Framework.Module;
namespace VIZ.ElectricRabbit.Module
{
/// <summary>
/// 应用程序启动 -- 初始化串口
/// </summary>
public class AppSetup_SerialPort : AppSetupBase
{
/// <summary>
/// 日志
/// </summary>
private static ILog log = LogManager.GetLogger(typeof(AppSetup_SerialPort));
/// <summary>
/// 描述
/// </summary>
public override string Detail { get; } = "应用程序启动 -- 串口";
/// <summary>
/// 输出串口号
/// </summary>
private readonly string CLIENT_OUTPUT_SERIAL_PORT = ApplicationDomainEx.IniStorage.GetValue<ClientConfig, string>(p => p.CLIENT_OUTPUT_SERIAL_PORT);
/// <summary>
/// 执行启动
/// </summary>
/// <param name="context">应用程序启动上下文</param>
/// <returns>是否成功执行</returns>
public override bool Setup(AppSetupContext context)
{
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);
down_endpoint_manager.Open();
return true;
}
/// <summary>
/// 执行关闭
/// </summary>
/// <param name="context">应用程序启动上下文</param>
public override void Shutdown(AppSetupContext context)
{
ConnectionManager.SerialPortConnection.Dispose();
}
}
}
\ No newline at end of file
...@@ -106,6 +106,8 @@ ...@@ -106,6 +106,8 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="MainView\Controller\Output\IOutputSupport.cs" />
<Compile Include="MainView\Controller\Output\OutputController.cs" />
<Compile Include="MainView\ViewModel\MainViewModel.cs" /> <Compile Include="MainView\ViewModel\MainViewModel.cs" />
<Compile Include="MainView\View\MainView.xaml.cs"> <Compile Include="MainView\View\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon> <DependentUpon>MainView.xaml</DependentUpon>
...@@ -127,6 +129,7 @@ ...@@ -127,6 +129,7 @@
<Compile Include="SettingView\View\SettingView.xaml.cs"> <Compile Include="SettingView\View\SettingView.xaml.cs">
<DependentUpon>SettingView.xaml</DependentUpon> <DependentUpon>SettingView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Setup\Provider\AppSetup_SerialPort.cs" />
<Compile Include="Setup\Provider\AppSetup_InitUDP.cs" /> <Compile Include="Setup\Provider\AppSetup_InitUDP.cs" />
<Compile Include="Setup\Provider\AppSetup_InitOpenCV.cs" /> <Compile Include="Setup\Provider\AppSetup_InitOpenCV.cs" />
<Compile Include="Setup\Provider\AppSetup_InitINI.cs" /> <Compile Include="Setup\Provider\AppSetup_InitINI.cs" />
......
...@@ -72,5 +72,11 @@ namespace VIZ.ElectricRabbit.Storage ...@@ -72,5 +72,11 @@ namespace VIZ.ElectricRabbit.Storage
/// </summary> /// </summary>
[Ini(Section = "Client", DefaultValue = "#FF00FF00", Type = typeof(Color))] [Ini(Section = "Client", DefaultValue = "#FF00FF00", Type = typeof(Color))]
public string CLIENT_SAFE_COLOR { get; set; } public string CLIENT_SAFE_COLOR { get; set; }
/// <summary>
/// 输出串口号
/// </summary>
[Ini(Section = "Client", DefaultValue = "COM1", Type = typeof(string))]
public string CLIENT_OUTPUT_SERIAL_PORT { get; set; }
} }
} }
...@@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 ...@@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.3.32825.248 VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "00-Doc", "00-Doc", "{1932D07C-1DF0-466F-99C0-D0A1E6A81E5E}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "00-Doc", "00-Doc", "{1932D07C-1DF0-466F-99C0-D0A1E6A81E5E}"
ProjectSection(SolutionItems) = preProject
Doc\数据格式.docx = Doc\数据格式.docx
EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "05-Lib", "05-Lib", "{65A5ED4D-A948-43D0-95E0-E4E1C1719F18}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "05-Lib", "05-Lib", "{65A5ED4D-A948-43D0-95E0-E4E1C1719F18}"
EndProject EndProject
...@@ -145,64 +148,64 @@ Global ...@@ -145,64 +148,64 @@ Global
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Debug|x64.Build.0 = Debug|x64 {26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Debug|x64.Build.0 = Debug|x64
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|Any CPU.ActiveCfg = Release|Any CPU {26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|Any CPU.Build.0 = Release|Any CPU {26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|Any CPU.Build.0 = Release|Any CPU
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.ActiveCfg = Release|Any CPU {26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.ActiveCfg = Release|x64
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.Build.0 = Release|Any CPU {26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.Build.0 = Release|x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|Any CPU.Build.0 = Debug|Any CPU {DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|x64.ActiveCfg = Debug|x64 {DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|x64.ActiveCfg = Debug|x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|x64.Build.0 = Debug|x64 {DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|x64.Build.0 = Debug|x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|Any CPU.ActiveCfg = Release|Any CPU {DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|Any CPU.Build.0 = Release|Any CPU {DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|Any CPU.Build.0 = Release|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.ActiveCfg = Release|Any CPU {DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.ActiveCfg = Release|x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.Build.0 = Release|Any CPU {DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.Build.0 = Release|x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|Any CPU.Build.0 = Debug|Any CPU {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|x64.ActiveCfg = Debug|x64 {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|x64.ActiveCfg = Debug|x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|x64.Build.0 = Debug|x64 {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|x64.Build.0 = Debug|x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|Any CPU.ActiveCfg = Release|Any CPU {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|Any CPU.Build.0 = Release|Any CPU {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|Any CPU.Build.0 = Release|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.ActiveCfg = Release|Any CPU {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.ActiveCfg = Release|x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.Build.0 = Release|Any CPU {4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.Build.0 = Release|x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|Any CPU.Build.0 = Debug|Any CPU {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|x64.ActiveCfg = Debug|x64 {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|x64.ActiveCfg = Debug|x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|x64.Build.0 = Debug|x64 {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|x64.Build.0 = Debug|x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|Any CPU.ActiveCfg = Release|Any CPU {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|Any CPU.Build.0 = Release|Any CPU {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|Any CPU.Build.0 = Release|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.ActiveCfg = Release|Any CPU {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.ActiveCfg = Release|x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.Build.0 = Release|Any CPU {688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.Build.0 = Release|x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|x64.ActiveCfg = Debug|x64 {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|x64.ActiveCfg = Debug|x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|x64.Build.0 = Debug|x64 {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|x64.Build.0 = Debug|x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|Any CPU.Build.0 = Release|Any CPU {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|Any CPU.Build.0 = Release|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.ActiveCfg = Release|Any CPU {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.ActiveCfg = Release|x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.Build.0 = Release|Any CPU {15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.Build.0 = Release|x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|Any CPU.Build.0 = Debug|Any CPU {013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|Any CPU.Build.0 = Debug|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|x64.ActiveCfg = Debug|x64 {013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|x64.ActiveCfg = Debug|x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|x64.Build.0 = Debug|x64 {013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|x64.Build.0 = Debug|x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|Any CPU.ActiveCfg = Release|Any CPU {013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|Any CPU.ActiveCfg = Release|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|Any CPU.Build.0 = Release|Any CPU {013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|Any CPU.Build.0 = Release|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.ActiveCfg = Release|Any CPU {013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.ActiveCfg = Release|x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.Build.0 = Release|Any CPU {013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.Build.0 = Release|x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|Any CPU.Build.0 = Debug|Any CPU {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|x64.ActiveCfg = Debug|x64 {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|x64.ActiveCfg = Debug|x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|x64.Build.0 = Debug|x64 {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|x64.Build.0 = Debug|x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|Any CPU.ActiveCfg = Release|Any CPU {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|Any CPU.Build.0 = Release|Any CPU {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|Any CPU.Build.0 = Release|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.ActiveCfg = Release|Any CPU {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.ActiveCfg = Release|x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.Build.0 = Release|Any CPU {D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.Build.0 = Release|x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|Any CPU.Build.0 = Debug|Any CPU {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|x64.ActiveCfg = Debug|x64 {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|x64.ActiveCfg = Debug|x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|x64.Build.0 = Debug|x64 {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|x64.Build.0 = Debug|x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|Any CPU.ActiveCfg = Release|Any CPU {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|Any CPU.Build.0 = Release|Any CPU {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|Any CPU.Build.0 = Release|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.ActiveCfg = Release|Any CPU {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.ActiveCfg = Release|x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.Build.0 = Release|Any CPU {B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
; ============================================================ ; ============================================================
[Application] [Application]
; 是否是调试模式 ; 是否是调试模式
APPLICATION_IS_DEBUG=true APPLICATION_IS_DEBUG=false
; ============================================================ ; ============================================================
; === Video === ; === Video ===
; ============================================================ ; ============================================================
...@@ -17,20 +17,22 @@ VIDEO_RENDER_WAIT=10 ...@@ -17,20 +17,22 @@ VIDEO_RENDER_WAIT=10
; OpenCV流索引 ; OpenCV流索引
CLIENT_OPEN_CV_STREAM_INDEX=1 CLIENT_OPEN_CV_STREAM_INDEX=1
; 本机绑定IP ; 本机绑定IP
CLIENT_UDP_BINDING_IP=192.168.3.11 CLIENT_UDP_BINDING_IP=127.0.0.1
; 本机绑定端口 ; 本机绑定端口
CLIENT_UDP_BINDING_PORT=8701 CLIENT_UDP_BINDING_PORT=8701
; 安全范围(单位:像素) ; 安全范围(单位:像素)
CLIENT_SAFE_DISTANCE=200 CLIENT_SAFE_DISTANCE=20
; 安全轴位置(单位:像素) ; 安全轴位置(单位:像素)
CLIENT_SAFE_AXIS=960 CLIENT_SAFE_AXIS=320
; 是否使用闪烁 ; 是否使用闪烁
CLIENT_IS_FLASHING_ENABLED=false CLIENT_IS_FLASHING_ENABLED=False
; 闪烁间隔(单位:秒) ; 闪烁间隔(单位:秒)
CLIENT_FLASHING_INTERVAL=1 CLIENT_FLASHING_INTERVAL=1
; 箭头向左颜色(格式:#AARRGGBB) ; 箭头向左颜色(格式:#AARRGGBB)
CLIENT_LEFT_COLOR=#FF0000FF CLIENT_LEFT_COLOR=#00000000
; 箭头向右颜色(格式:#AARRGGBB) ; 箭头向右颜色(格式:#AARRGGBB)
CLIENT_RIGHT_COLOR=#FFFF0000 CLIENT_RIGHT_COLOR=#00000000
; 箭头安全颜色(格式:#AARRGGBB) ; 箭头安全颜色(格式:#AARRGGBB)
CLIENT_SAFE_COLOR=#FF00FF00 CLIENT_SAFE_COLOR=#00000000
\ No newline at end of file ; 输出串口号
CLIENT_OUTPUT_SERIAL_PORT=COM1
\ No newline at end of file
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