|
@@ -1,10 +1,10 @@
|
|
|
-/*************************************************************************
|
|
|
+/*****************************************************************
|
|
|
* Copyright:2016-2020 www.corvin.cn ROS小课堂
|
|
|
* Description:使用串口方式读取IMU模块信息.
|
|
|
* Author: corvin
|
|
|
* History:
|
|
|
* 20200401:init this file.
|
|
|
- *************************************************************************/
|
|
|
+******************************************************************/
|
|
|
#include<ros/ros.h>
|
|
|
#include<stdio.h>
|
|
|
#include<stdlib.h>
|
|
@@ -24,7 +24,7 @@ float acce[3],angular[3],angle[3],quater[4];
|
|
|
* Description:打开串口,输入各参数即可.
|
|
|
*********************************************/
|
|
|
int openSerialPort(const char *path, int baud, int dataBits,
|
|
|
- const char* parity, int stopBit)
|
|
|
+ const char* parity, int stopBit)
|
|
|
{
|
|
|
int fd = 0;
|
|
|
struct termios terminfo;
|
|
@@ -179,7 +179,6 @@ int recv_data(int fd, char* recv_buffer, int len)
|
|
|
return length;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/************************************************************
|
|
|
* Description:根据串口数据协议来解析有效数据,
|
|
|
***********************************************************/
|
|
@@ -324,4 +323,3 @@ int getImuData()
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
-
|