aboutsummaryrefslogtreecommitdiffstats
path: root/serial/serial.h
diff options
context:
space:
mode:
Diffstat (limited to 'serial/serial.h')
-rw-r--r--serial/serial.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/serial/serial.h b/serial/serial.h
index 8061b24..7f09bf8 100644
--- a/serial/serial.h
+++ b/serial/serial.h
@@ -17,11 +17,14 @@
17#define MAX_BUFFER_SIZE 1024 17#define MAX_BUFFER_SIZE 1024
18#define DEFAULT_SPEED 0x15 // 默认速度,百分比 18#define DEFAULT_SPEED 0x15 // 默认速度,百分比
19// TODO: 两个待测数据 19// TODO: 两个待测数据
20#define RADIUS 0.3 // 两轮之间的距离的一半,米 20#define RADIUS 0.26 // 两轮之间的距离的一半,米
21#define FULLSPEED 1.5 // 轮子全速,m/s 21#define FULLSPEED 1.5 // 轮子全速,m/s
22#define fabs(x) ((x) > 0 ? (x) : -(x)) 22#define fabs(x) ((x) > 0 ? (x) : -(x))
23typedef unsigned char byte; 23typedef unsigned char byte;
24 24
25int identify_device(const char *port);
26const char *findUSBDev(const char *device_type);
27
25bool whellInit(); 28bool whellInit();
26bool wheelSend(byte a, byte a_v, byte b, byte b_v); 29bool wheelSend(byte a, byte a_v, byte b, byte b_v);
27void parseCmd(const lcm_recv_buf_t *rbuf, const char *channel, 30void parseCmd(const lcm_recv_buf_t *rbuf, const char *channel,
@@ -29,7 +32,7 @@ void parseCmd(const lcm_recv_buf_t *rbuf, const char *channel,
29void parsePath(const lcm_recv_buf_t *rbuf, const char *channel, 32void parsePath(const lcm_recv_buf_t *rbuf, const char *channel,
30 const path_t *msg, void *userdata); 33 const path_t *msg, void *userdata);
31void setCurPose(const lcm_recv_buf_t *rbuf, const char *channel, 34void setCurPose(const lcm_recv_buf_t *rbuf, const char *channel,
32 const pose_t *msg, void *userdata); 35 const pose_t *msg, void *userdata);
33void renewCurPose(); 36void renewCurPose();
34void sendCurPose(); 37void sendCurPose();
35 38