Commit de93976f authored by JiangYixing's avatar JiangYixing

自动生成set指令

parents
Pipeline #122 failed with stages
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4FE48BBE-216A-4DDC-95F6-2F14D6601119}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>AutoCMDVisual</RootNamespace>
<AssemblyName>AutoCMDVisual</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AutoSetCMD.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AutoSetCMD.Designer.cs">
<DependentUpon>AutoSetCMD.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="AutoSetCMD.resx">
<DependentUpon>AutoSetCMD.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AutoSetCMD.zh-Hans.resx">
<DependentUpon>AutoSetCMD.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30621.155
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoCMDVisual", "AutoCMDVisual.csproj", "{4FE48BBE-216A-4DDC-95F6-2F14D6601119}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4FE48BBE-216A-4DDC-95F6-2F14D6601119}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FE48BBE-216A-4DDC-95F6-2F14D6601119}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FE48BBE-216A-4DDC-95F6-2F14D6601119}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FE48BBE-216A-4DDC-95F6-2F14D6601119}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {31C89761-49E0-4A58-8836-F130B70FC67F}
EndGlobalSection
EndGlobal
namespace AutoCMDVisual
{
partial class AutoSetCMD
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AutoSetCMD));
this.生成 = new System.Windows.Forms.Button();
this.Trigger1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.Trigger2 = new System.Windows.Forms.TextBox();
this.Trigger3 = new System.Windows.Forms.TextBox();
this.Trigger4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.CMDOutput = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// 生成
//
this.生成.BackColor = System.Drawing.SystemColors.Info;
resources.ApplyResources(this.生成, "生成");
this.生成.Name = "生成";
this.生成.UseVisualStyleBackColor = false;
this.生成.Click += new System.EventHandler(this.button1_Click);
//
// Trigger1
//
resources.ApplyResources(this.Trigger1, "Trigger1");
this.Trigger1.Name = "Trigger1";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
this.label1.UseCompatibleTextRendering = true;
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// Trigger2
//
resources.ApplyResources(this.Trigger2, "Trigger2");
this.Trigger2.Name = "Trigger2";
//
// Trigger3
//
resources.ApplyResources(this.Trigger3, "Trigger3");
this.Trigger3.Name = "Trigger3";
//
// Trigger4
//
resources.ApplyResources(this.Trigger4, "Trigger4");
this.Trigger4.Name = "Trigger4";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// CMDOutput
//
this.CMDOutput.AcceptsReturn = true;
this.CMDOutput.AcceptsTab = true;
this.CMDOutput.BackColor = System.Drawing.SystemColors.Info;
this.CMDOutput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
resources.ApplyResources(this.CMDOutput, "CMDOutput");
this.CMDOutput.Name = "CMDOutput";
//
// AutoSetCMD
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.SystemColors.MenuBar;
this.Controls.Add(this.CMDOutput);
this.Controls.Add(this.label5);
this.Controls.Add(this.Trigger4);
this.Controls.Add(this.Trigger3);
this.Controls.Add(this.Trigger2);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.Trigger1);
this.Controls.Add(this.生成);
this.DoubleBuffered = true;
this.Name = "AutoSetCMD";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button 生成;
private System.Windows.Forms.TextBox Trigger1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox Trigger2;
private System.Windows.Forms.TextBox Trigger3;
private System.Windows.Forms.TextBox Trigger4;
private System.Windows.Forms.Label label5;
public System.Windows.Forms.TextBox CMDOutput;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AutoCMDVisual
{
public partial class AutoSetCMD : Form
{
double[] ChannelDelays = { 0.00003, 0.078 + 0.00003, 0.05 + 0.00003, 0.074 + 0.00003, 1, 1, 1, 1 };//ms Trigger 1 -> Trigger 4
byte mask = 0xff;
byte IfReceiveOutTrigger = 0x01;
public AutoSetCMD()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
double t1, t2, t3, t4;
byte[] setcmd = new byte[37];
uint PeriodNum=0;
int i=0, j=0;
uint checksum = 0;
string string1;
string string2;
try
{
if (!(Trigger1.Text == null))
{
t1 = Double.Parse(Trigger1.Text) + 0.00003;
}
else
{
t1 = 0.00003;
}
if (!(Trigger2.Text == null))
{
t2 = Double.Parse(Trigger2.Text) + 0.00003;
}
else
{
t2 = 0.00003;
}
if (!(Trigger3.Text == null))
{
t3 = Double.Parse(Trigger3.Text) + 0.00003;
}
else
{
t3 = 0.00003;
}
if (!(Trigger4.Text == null))
{
t4 = Double.Parse(Trigger4.Text) + 0.00003;
}
else
{
t4 = 0.00003;
}
ChannelDelays[0] = t1;
ChannelDelays[1] = t2;
ChannelDelays[2] = t3;
ChannelDelays[3] = t4;
setcmd[0] = 0x00;
for (i = 0; i < ChannelDelays.Length; i++)
{
PeriodNum = (uint)(100000 * ChannelDelays[i]);
for (j = 0; j < 4; j++)
{
setcmd[i * 4 + j + 1] = (byte)(PeriodNum >> (24 - 8 * j));
}
}
setcmd[33] = mask;
setcmd[34] = IfReceiveOutTrigger;
for (i = 0; i < setcmd.Length; i++)
{
checksum += setcmd[i];
}
setcmd[35] = (byte)(checksum >> 8);
setcmd[36] = (byte)(checksum);
string1 = BitConverter.ToString(setcmd);
string2 = string1.Replace('-', ' ');
//Console.WriteLine(string2);
CMDOutput.Text = string2;
}
catch { }
}
}
}
This diff is collapsed.
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AutoCMDVisual
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new AutoSetCMD());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("AutoCMDVisual")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AutoCMDVisual")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("4fe48bbe-216a-4ddc-95f6-2f14d6601119")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AutoCMDVisual.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AutoCMDVisual.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 覆盖当前线程的 CurrentUICulture 属性
/// 使用此强类型的资源类的资源查找。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AutoCMDVisual.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\bin\Debug\AutoCMDVisual.exe.config
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\bin\Debug\AutoCMDVisual.exe
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\bin\Debug\AutoCMDVisual.pdb
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\bin\Debug\zh-Hans\AutoCMDVisual.resources.dll
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.csprojAssemblyReference.cache
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.AutoSetCMD.resources
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.Properties.Resources.resources
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.AutoSetCMD.zh-Hans.resources
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.csproj.GenerateResource.cache
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.csproj.CoreCompileInputs.cache
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\zh-Hans\AutoCMDVisual.resources.dll
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.exe
C:\Users\10938\Desktop\Auto_SetCmd\AutoCMDVisual\obj\Debug\AutoCMDVisual.pdb
This diff is collapsed.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HslCommunication" Version="9.6.3" />
</ItemGroup>
</Project>

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30621.155
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMD", "CMD.csproj", "{B6B155AA-2BBF-44A0-97ED-07753701C290}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6B155AA-2BBF-44A0-97ED-07753701C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6B155AA-2BBF-44A0-97ED-07753701C290}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6B155AA-2BBF-44A0-97ED-07753701C290}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6B155AA-2BBF-44A0-97ED-07753701C290}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {434EC9F0-C132-4EBB-AB4A-49DCE0F1A902}
EndGlobalSection
EndGlobal
using System;
using HslCommunication.Serial;
using System.IO;
using System.Text;
namespace CMD
{
class Program
{
static double[] ChannelDelays = { 0.00003,0.078+0.00003, 0.05+0.00003, 0.074 + 0.00003,1,1,1,1};//ms Trigger 1 -> Trigger 4
static byte mask = 0xff;
static byte IfReceiveOutTrigger = 0x01;
static void Main(string[] args)
{
byte[] setcmd = new byte[37];
setcmd[0] = 0x00;
uint PeriodNum;
int i, j;
for (i = 0; i < ChannelDelays.Length; i++)
{
PeriodNum = (uint)(100000 * ChannelDelays[i]);
for (j = 0; j < 4; j++)
{
setcmd[i * 4 + j + 1] = (byte)(PeriodNum >> (24 - 8 * j));
}
}
setcmd[33] = mask;
setcmd[34] = IfReceiveOutTrigger;
uint checksum = 0;
for (i = 0; i < setcmd.Length; i++)
{
checksum += setcmd[i];
}
setcmd[35] = (byte)(checksum >> 8);
setcmd[36] = (byte)(checksum);
string string1 = BitConverter.ToString(setcmd);
string string2 = string1.Replace('-', ' ');
Console.WriteLine(string2);
Byte[] cmd = new Byte[] { 0x02, 0x03, 0x00, 0x04, 0x00, 0x06 };
Byte[] CRCcheck = SoftCRC16.CRC16(cmd);
string newstring1 = BitConverter.ToString(cmd);
string newstring2 = newstring1.Replace('-', ' ');
Console.WriteLine(newstring2);
string wnewstring1 = BitConverter.ToString(CRCcheck);
string wnewstring2 = wnewstring1.Replace('-', ' ');
Console.WriteLine(wnewstring2);
Byte[] testcrccheck = new Byte[] { 0x02, 0x03, 0x00, 0x04, 0x00, 0x06,0x84,0x3a};
Console.Write(SoftCRC16.CheckCRC16(testcrccheck ));
FileStream CommandsFIle = new FileStream("C:\\Users\\10938\\Desktop\\Auto_SetCmd\\Command.txt",FileMode.OpenOrCreate,FileAccess.ReadWrite, FileShare.ReadWrite);
byte[] cmdtest;
byte[] cmdaddcrc;
string newteststring1;
string newteststring2;
int m;
for ( m = 0x01; m <= 0x01ff; m++)
{
cmdtest = new byte[] { (byte)m,0x02 ,0x00,0x00,0x00,0x08};
cmdaddcrc = SoftCRC16.CRC16(cmdtest);
newteststring1 = BitConverter.ToString(cmdaddcrc);
newteststring2 = newteststring1.Replace('-', ' ')+"\n";
byte[] bytes = Encoding.UTF8.GetBytes(newteststring2);
CommandsFIle.Write(bytes,0,bytes.Length);
//CommandsFIle.Write("\n");
}
}
}
}
{
"profiles": {
"CMD": {
"commandName": "Project"
}
}
}
\ No newline at end of file
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v3.1",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v3.1": {
"CMD/1.0.0": {
"dependencies": {
"HslCommunication": "9.6.3"
},
"runtime": {
"CMD.dll": {}
}
},
"HslCommunication/9.6.3": {
"dependencies": {
"Newtonsoft.Json": "12.0.3",
"System.IO.Ports": "4.7.0"
},
"runtime": {
"lib/netstandard2.1/HslCommunication.dll": {
"assemblyVersion": "9.6.3.0",
"fileVersion": "9.6.3.0"
}
}
},
"Microsoft.NETCore.Platforms/3.1.0": {},
"Microsoft.Win32.Registry/4.7.0": {
"dependencies": {
"System.Security.AccessControl": "4.7.0",
"System.Security.Principal.Windows": "4.7.0"
}
},
"Newtonsoft.Json/12.0.3": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "12.0.0.0",
"fileVersion": "12.0.3.23909"
}
}
},
"runtime.linux-arm.runtime.native.System.IO.Ports/4.7.0": {
"runtimeTargets": {
"runtimes/linux-arm/native/System.IO.Ports.Native.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.7.0": {
"runtimeTargets": {
"runtimes/linux-arm64/native/System.IO.Ports.Native.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.7.0": {
"runtimeTargets": {
"runtimes/linux-x64/native/System.IO.Ports.Native.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.native.System.IO.Ports/4.7.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "4.7.0",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "4.7.0",
"runtime.linux-x64.runtime.native.System.IO.Ports": "4.7.0",
"runtime.osx-x64.runtime.native.System.IO.Ports": "4.7.0"
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.7.0": {
"runtimeTargets": {
"runtimes/osx-x64/native/System.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"System.IO.Ports/4.7.0": {
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"runtime.native.System.IO.Ports": "4.7.0"
},
"runtime": {
"lib/netstandard2.0/System.IO.Ports.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
}
},
"runtimeTargets": {
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "linux",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "osx",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
}
}
},
"System.Security.AccessControl/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"System.Security.Principal.Windows": "4.7.0"
}
},
"System.Security.Principal.Windows/4.7.0": {}
}
},
"libraries": {
"CMD/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"HslCommunication/9.6.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LktOQuG8tE62BR4Xo/S+QEcKiKjn/LzgSKAvD5mfrcm45DbUzIqsxkPMMnoQVOo8PkuAksLz7VuqwbkzK/aOuw==",
"path": "hslcommunication/9.6.3",
"hashPath": "hslcommunication.9.6.3.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
"path": "microsoft.netcore.platforms/3.1.0",
"hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
},
"Microsoft.Win32.Registry/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KSrRMb5vNi0CWSGG1++id2ZOs/1QhRqROt+qgbEAdQuGjGrFcl4AOl4/exGPUYz2wUnU42nvJqon1T3U0kPXLA==",
"path": "microsoft.win32.registry/4.7.0",
"hashPath": "microsoft.win32.registry.4.7.0.nupkg.sha512"
},
"Newtonsoft.Json/12.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-6mgjfnRB4jKMlzHSl+VD+oUc1IebOZabkbyWj2RiTgWwYPPuaK1H97G1sHqGwPlS5npiF5Q0OrxN1wni2n5QWg==",
"path": "newtonsoft.json/12.0.3",
"hashPath": "newtonsoft.json.12.0.3.nupkg.sha512"
},
"runtime.linux-arm.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pCaX07mRrO11GfUb+whjn2AJgCofx26slw0sI3XC9v0pEZO8101iK6q4ymZOiI2M4a9sQxLr2LawAEDvF4RNXg==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/J6A4bexUUJciGUwrhtzrFW4tIHqoJYlCsz5RudRmqUaqvuG2tjrbn6bEopOFs7CU4gZqAKWcU9pkp180c3DkQ==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aaaiH4ttfkLizo0OKf++5kPN0yxKbgzcyAD3w52Y3YP96aB/M79fm0r06SedXJGv86Iou6ipj3wUQBMFaL8LnQ==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-yidiZEGEIOyGnRkZvoV6XbeqzEBg9L47PyZNBymLIsu9HHseF98wiOxR6RnHmMqQMTBlc/EONfw4NT3pw0S6YQ==",
"path": "runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-c1h87v6gopjfeAu3WhVGguUhzCdpZFqX8oXrevO1ciuH4g/mFrxnzlo5POlp+TtZdQ1i8yu0ZzBMKbmX2bJJ0g==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-tNHiZcdskfRpxU7LBBlA69YYgBqWMBE/JDdmrEIDa4iw944VK1u4+B0FeSls1FUm+Pm4X/Fl0fSGqi8MDhb8/Q==",
"path": "system.io.ports/4.7.0",
"hashPath": "system.io.ports.4.7.0.nupkg.sha512"
},
"System.Security.AccessControl/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==",
"path": "system.security.accesscontrol/4.7.0",
"hashPath": "system.security.accesscontrol.4.7.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==",
"path": "system.security.principal.windows/4.7.0",
"hashPath": "system.security.principal.windows.4.7.0.nupkg.sha512"
}
}
}
\ No newline at end of file
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\10938\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\10938\\.nuget\\packages",
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
]
}
}
\ No newline at end of file
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "3.1.0"
}
}
}
\ No newline at end of file
{
"format": 1,
"restore": {
"C:\\Users\\10938\\Desktop\\Auto_SetCmd\\CMD\\CMD.csproj": {}
},
"projects": {
"C:\\Users\\10938\\Desktop\\Auto_SetCmd\\CMD\\CMD.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\10938\\Desktop\\Auto_SetCmd\\CMD\\CMD.csproj",
"projectName": "CMD",
"projectPath": "C:\\Users\\10938\\Desktop\\Auto_SetCmd\\CMD\\CMD.csproj",
"packagesPath": "C:\\Users\\10938\\.nuget\\packages\\",
"outputPath": "C:\\Users\\10938\\Desktop\\Auto_SetCmd\\CMD\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\10938\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"http://222.20.94.134:14999/nuget": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"dependencies": {
"HslCommunication": {
"target": "Package",
"version": "[9.6.3, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.403\\RuntimeIdentifierGraph.json"
}
}
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\10938\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.7.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="$([MSBuild]::EnsureTrailingSlash($(NuGetPackageFolders)))" />
</ItemGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("CMD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("CMD")]
[assembly: System.Reflection.AssemblyTitleAttribute("CMD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。
ff56c74feef3957aa5ff19ce05ac84613e8ee4c4
C:\Users\10938\Desktop\CPPHomework\CMD\bin\Debug\netcoreapp3.1\CMD.exe
C:\Users\10938\Desktop\CPPHomework\CMD\bin\Debug\netcoreapp3.1\CMD.deps.json
C:\Users\10938\Desktop\CPPHomework\CMD\bin\Debug\netcoreapp3.1\CMD.runtimeconfig.json
C:\Users\10938\Desktop\CPPHomework\CMD\bin\Debug\netcoreapp3.1\CMD.runtimeconfig.dev.json
C:\Users\10938\Desktop\CPPHomework\CMD\bin\Debug\netcoreapp3.1\CMD.dll
C:\Users\10938\Desktop\CPPHomework\CMD\bin\Debug\netcoreapp3.1\CMD.pdb
C:\Users\10938\Desktop\CPPHomework\CMD\obj\Debug\netcoreapp3.1\CMD.csprojAssemblyReference.cache
C:\Users\10938\Desktop\CPPHomework\CMD\obj\Debug\netcoreapp3.1\CMD.AssemblyInfoInputs.cache
C:\Users\10938\Desktop\CPPHomework\CMD\obj\Debug\netcoreapp3.1\CMD.AssemblyInfo.cs
C:\Users\10938\Desktop\CPPHomework\CMD\obj\Debug\netcoreapp3.1\CMD.csproj.CoreCompileInputs.cache
C:\Users\10938\Desktop\CPPHomework\CMD\obj\Debug\netcoreapp3.1\CMD.dll
C:\Users\10938\Desktop\CPPHomework\CMD\obj\Debug\netcoreapp3.1\CMD.pdb
C:\Users\10938\Desktop\CPPHomework\CMD\obj\Debug\netcoreapp3.1\CMD.genruntimeconfig.cache
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\CMD.exe
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\CMD.deps.json
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\CMD.runtimeconfig.json
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\CMD.runtimeconfig.dev.json
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\CMD.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\CMD.pdb
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.csprojAssemblyReference.cache
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.AssemblyInfoInputs.cache
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.AssemblyInfo.cs
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.pdb
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.genruntimeconfig.cache
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\HslCommunication.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\Newtonsoft.Json.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\System.IO.Ports.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\runtimes\linux-arm\native\System.IO.Ports.Native.so
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\runtimes\linux-arm64\native\System.IO.Ports.Native.so
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\runtimes\linux-x64\native\System.IO.Ports.Native.so
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\runtimes\osx-x64\native\System.IO.Ports.Native.dylib
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\runtimes\linux\lib\netstandard2.0\System.IO.Ports.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\runtimes\osx\lib\netstandard2.0\System.IO.Ports.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\bin\Debug\netcoreapp3.1\runtimes\win\lib\netstandard2.0\System.IO.Ports.dll
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.csproj.CoreCompileInputs.cache
C:\Users\10938\Desktop\Auto_SetCmd\CMD\obj\Debug\netcoreapp3.1\CMD.csproj.CopyComplete
86c8e15dd33445635927cfaf398408205fd11473
This diff is collapsed.
{
"version": 2,
"dgSpecHash": "UV1yW+5TdTFn485B/xWrToyZio3mWTwACAzXrycLwoHjQ3i53i/zyjTXJDuOHQAbaWGGX+bLH4qkzL3gKdf2Qg==",
"success": true,
"projectFilePath": "C:\\Users\\10938\\Desktop\\Auto_SetCmd\\CMD\\CMD.csproj",
"expectedPackageFiles": [
"C:\\Users\\10938\\.nuget\\packages\\hslcommunication\\9.6.3\\hslcommunication.9.6.3.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\microsoft.win32.registry\\4.7.0\\microsoft.win32.registry.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\newtonsoft.json\\12.0.3\\newtonsoft.json.12.0.3.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\runtime.linux-arm.runtime.native.system.io.ports\\4.7.0\\runtime.linux-arm.runtime.native.system.io.ports.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\runtime.linux-arm64.runtime.native.system.io.ports\\4.7.0\\runtime.linux-arm64.runtime.native.system.io.ports.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\runtime.linux-x64.runtime.native.system.io.ports\\4.7.0\\runtime.linux-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\runtime.native.system.io.ports\\4.7.0\\runtime.native.system.io.ports.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\runtime.osx-x64.runtime.native.system.io.ports\\4.7.0\\runtime.osx-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\system.io.ports\\4.7.0\\system.io.ports.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\system.security.accesscontrol\\4.7.0\\system.security.accesscontrol.4.7.0.nupkg.sha512",
"C:\\Users\\10938\\.nuget\\packages\\system.security.principal.windows\\4.7.0\\system.security.principal.windows.4.7.0.nupkg.sha512"
],
"logs": []
}
\ No newline at end of file
本文件夹为DT的Set指令自动生成的代码。CMD文件夹是控制台模式,需要用visual studio打开CMD.sln文件,手动修改ChannelDelays数组中前四个数据的值,分别对应Trigger1 -> Trigger4的延时。下图中分别表示延时为0ms 0.078ms 0.05ms 0.074ms,在每一个后面都加了0.00003是因为由于硬件反应速度的缘故,延时必须大于这个0.00003ms.所以在每一个后面都加上0.00003ms。
<div align=center>
![](images/2021-05-13-09-59-10.png)
</div>
然后运行程序即可得到输出 第一行就是所需要的命令
<div align=center>
![](images/2021-05-13-10-01-57.png)
</div>
AutoCMDVisual是以上程序的图形界面形式。 直接运行AutoCMDVisual/bin/DEbug/AutoCMDVisual.exe即可
这里输入的延时不需要加上0.00003
<div align=center>
![](images/2021-05-13-10-05-07.png)
</div>
\ No newline at end of file
File added
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