1

Control/control.h

Committer:
shaorui
Date:
2020-01-07
Revision:
8:95a914f962bd

File content as of revision 8:95a914f962bd:


#ifndef CONTROL_H_
#define CONTROL_H_
#define FRAME_HEADER 0x55             //帧头
#define CMD_SERVO_MOVE 0x03           //舵机du移动指令
#define CMD_ACTION_GROUP_RUN 0x06     //运行动作组指令
#define CMD_ACTION_GROUP_STOP 0x07    //停止ti动作组指令
#define CMD_ACTION_GROUP_SPEED 0x0B   //设置动作组运行速度
#define CMD_GET_BATTERY_VOLTAGE 0x0F  //获取电池电压指令
#include "mbed.h"
#include "data_pc.h"
extern uint8_t LobotRxBuf[16];
extern uint16_t batteryVolt;
extern void receiveHandle(void);
typedef struct _lobot_servo_ {  //舵机ID,舵机目标位置
    uint8_t ID;
    uint16_t Position;
} LobotServo;


void moveServo(uint8_t servoID, uint16_t Position, uint16_t Time);
void getBatteryVoltage(void);
void BaterryOut(void);


#endif