1

Committer:
ccxx1200
Date:
Thu Mar 12 15:17:18 2020 +0000
Revision:
10:f94e325fc1e6
Parent:
8:95a914f962bd
1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shaorui 8:95a914f962bd 1
shaorui 8:95a914f962bd 2 #ifndef CONTROL_H_
shaorui 8:95a914f962bd 3 #define CONTROL_H_
shaorui 8:95a914f962bd 4 #define FRAME_HEADER 0x55 //帧头
shaorui 8:95a914f962bd 5 #define CMD_SERVO_MOVE 0x03 //舵机du移动指令
shaorui 8:95a914f962bd 6 #define CMD_ACTION_GROUP_RUN 0x06 //运行动作组指令
shaorui 8:95a914f962bd 7 #define CMD_ACTION_GROUP_STOP 0x07 //停止ti动作组指令
shaorui 8:95a914f962bd 8 #define CMD_ACTION_GROUP_SPEED 0x0B //设置动作组运行速度
shaorui 8:95a914f962bd 9 #define CMD_GET_BATTERY_VOLTAGE 0x0F //获取电池电压指令
shaorui 8:95a914f962bd 10 #include "mbed.h"
shaorui 8:95a914f962bd 11 #include "data_pc.h"
shaorui 8:95a914f962bd 12 extern uint8_t LobotRxBuf[16];
shaorui 8:95a914f962bd 13 extern uint16_t batteryVolt;
shaorui 8:95a914f962bd 14 extern void receiveHandle(void);
shaorui 8:95a914f962bd 15 typedef struct _lobot_servo_ { //舵机ID,舵机目标位置
shaorui 8:95a914f962bd 16 uint8_t ID;
shaorui 8:95a914f962bd 17 uint16_t Position;
shaorui 8:95a914f962bd 18 } LobotServo;
shaorui 8:95a914f962bd 19
shaorui 8:95a914f962bd 20
shaorui 8:95a914f962bd 21 void moveServo(uint8_t servoID, uint16_t Position, uint16_t Time);
shaorui 8:95a914f962bd 22 void getBatteryVoltage(void);
shaorui 8:95a914f962bd 23 void BaterryOut(void);
shaorui 8:95a914f962bd 24
shaorui 8:95a914f962bd 25
shaorui 8:95a914f962bd 26 #endif