Files
BC1C-firmware/app/by_motion.h
bmy f2caaae8c8 pref: 为三个方向设置独立的标志位
保证移动距离完整,防止下发某一方向速度指令时,导致其他方向无法正常退出距离控制模式的问题
2024-07-28 16:24:31 +08:00

32 lines
764 B
C

#ifndef _BY_MOTION_H__
#define _BY_MOTION_H__
#include "at32f403a_407.h"
typedef struct motion_speed_type {
float v_x;
float v_y;
float v_w;
} motion_speed_type;
typedef struct motion_time_type {
uint32_t t_x;
uint32_t t_y;
uint32_t t_w;
} motion_time_type;
extern void by_motion_init(void);
extern void by_motion_update_speed(void);
extern void by_motion_loop(void);
extern void by_motion_set_mode(uint8_t mode);
extern void by_motion_timer_handle(void);
// extern void by_motion_set_mode(uint8_t mode);
extern void by_motion_set_mode_x(uint8_t mode);
extern void by_motion_set_mode_y(uint8_t mode);
extern void by_motion_set_mode_w(uint8_t mode);
extern motion_speed_type motion_speed_struct;
extern motion_time_type motion_time_struct;
#endif