资源简介
RPLIDAR A2官网:http://www.slamtec.com/cn/Lidar/A2
用C#重新编写了传输协议,本人代码技术有限,程序若有写的不好的地方,多多包涵
用C#重新编写了传输协议,本人代码技术有限,程序若有写的不好的地方,多多包涵

代码片段和文件信息
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;
using System.IO.Ports;
using System.Threading;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace RPLIDAR
{
public partial class Form1 : Form
{
#region -- Load value --
Thread read;
Thread calcirclethread;
SerialPort comm = new SerialPort();
int showfre = 31;
ScanPoint[] ScanData;
Byte[] STARTSCAN = new Byte[9] { 0xA5 0x82 0x05 0x00 0x00 0x00 0x00 0x00 0x22 };
Byte[] STOPSCAN = new Byte[2] { 0xA5 0x25};
Byte[] STARTROTATE = new Byte[6] { 0xA5 0xF0 0x02 0xC4 0x02 0x91};
Byte[] STOPROTATE = new Byte[6] { 0xA5 0xF0 0x02 0x00 0x00 0x57 };
string input = ““;
int loop = 0;
string angle = ““;
string lastangle = ““;
int startalready = 0;
int startangle = 0;
bool StartOfNewScan = true;
int typei = 0;
double typed = 0;
readonly string[] HealtStatusStrings = { “Good“ “Poor“ “Critical“ “Unknown“ };
Bitmap m_bmp;
//画布中的图像
Point m_ptCanvas; //画布原点在设备上的坐标
Point m_ptBmp; //图像位于画布坐标系中的坐标
float m_nScale = 1.0F; //缩放比例
Point m_ptMouseMove; //鼠标移动是在设备坐标上的坐标
int showangle = 0;
bool startshow = false;
int oldangle = 0;
float olddistance = 0;
bool sendalready = false;
bool startscan = false;
int length = 7;
int checklen = 0;
byte[] buffer;
int errornumber = 1;
bool checkalready = false;
string[] lastdeg = new string[2 16];
int group = 0;
static string port = “COM5“;
Stopwatch watch = new Stopwatch();
double deltatime = 0;
bool DRAWCIRCLE = false;
Circle nicecircle;
int[] recordx = new int[3231];
int[] recordy = new int[3231];
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
this.pictureBox1.Borderstyle = Borderstyle.FixedSingle;
this.pictureBox1.MouseWheel += new MouseEventHandler(pictureBox1_MouseWheel);
}
//Form Load
private void Form1_Load(object sender EventArgs e)
{
read = new Thread(new ThreadStart(readvalue));
read.IsBackground = true;
calcirclethread = new Thread(new ThreadStart(circlethread));
calcirclethread.IsBackground = true;
m_bmp = new Bitmap(pictureBox1.Width pictureBox1.Height);
m_ptCanvas = new Point(pictureBox1.Width / 2 pictureBox1.Height / 2
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 15 2019-03-20 22:54 RPLIDAR\.git\COMMIT_EDITMSG
文件 302 2019-03-20 22:55 RPLIDAR\.git\config
文件 25 2019-03-20 22:54 RPLIDAR\.git\desc
文件 97 2020-02-26 03:41 RPLIDAR\.git\FETCH_HEAD
文件 23 2019-03-20 22:54 RPLIDAR\.git\HEAD
文件 478 2019-03-20 22:54 RPLIDAR\.git\hooks\applypatch-msg.sample
文件 896 2019-03-20 22:54 RPLIDAR\.git\hooks\commit-msg.sample
文件 3327 2019-03-20 22:54 RPLIDAR\.git\hooks\fsmonitor-watchman.sample
文件 189 2019-03-20 22:54 RPLIDAR\.git\hooks\post-update.sample
文件 424 2019-03-20 22:54 RPLIDAR\.git\hooks\pre-applypatch.sample
文件 1638 2019-03-20 22:54 RPLIDAR\.git\hooks\pre-commit.sample
文件 1348 2019-03-20 22:54 RPLIDAR\.git\hooks\pre-push.sample
文件 4898 2019-03-20 22:54 RPLIDAR\.git\hooks\pre-reba
文件 544 2019-03-20 22:54 RPLIDAR\.git\hooks\pre-receive.sample
文件 1492 2019-03-20 22:54 RPLIDAR\.git\hooks\prepare-commit-msg.sample
文件 3610 2019-03-20 22:54 RPLIDAR\.git\hooks\update.sample
文件 4897 2020-02-21 00:28 RPLIDAR\.git\index
文件 240 2019-03-20 22:54 RPLIDAR\.git\info\exclude
文件 340 2020-02-21 00:28 RPLIDAR\.git\logs\HEAD
文件 340 2020-02-21 00:28 RPLIDAR\.git\logs\refs\heads\master
文件 331 2019-03-20 23:36 RPLIDAR\.git\logs\refs\remotes\origin\master
文件 443 2019-03-20 22:54 RPLIDAR\.git\ob
文件 1352 2019-03-20 22:54 RPLIDAR\.git\ob
文件 49 2019-03-20 22:54 RPLIDAR\.git\ob
文件 558 2019-03-20 23:36 RPLIDAR\.git\ob
文件 2638 2019-03-20 22:54 RPLIDAR\.git\ob
文件 3299 2019-03-20 22:54 RPLIDAR\.git\ob
文件 721 2019-03-20 22:54 RPLIDAR\.git\ob
文件 117 2019-03-20 22:54 RPLIDAR\.git\ob
文件 420 2019-03-20 22:54 RPLIDAR\.git\ob
............此处省略171个文件信息
- 上一篇:c# 学生选课系统
- 下一篇:C#用NPOI固定模版导出数据到excel表格.txt
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论