60 lines
807 B
C
60 lines
807 B
C
|
#ifndef _ACTION_H_
|
||
|
#define _ACTION_H_
|
||
|
|
||
|
#define RS232_FRAME_LENGTH 28u
|
||
|
#define REF_LEN_RX_BUFF 0xFF
|
||
|
|
||
|
#include <cmsis_os2.h>
|
||
|
#include "device.h"
|
||
|
#include "bsp_usart.h"
|
||
|
#include "cmd.h"
|
||
|
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
osTimerId_t action_timer_Id;
|
||
|
/*原始数据*/
|
||
|
fp32 pos_x;
|
||
|
fp32 pos_y;
|
||
|
fp32 pos_yaw; // 航向角速度
|
||
|
/*处理数据*/
|
||
|
fp32 pos_Vx;
|
||
|
fp32 pos_Vy;
|
||
|
fp32 pos_lastX;
|
||
|
fp32 pos_lastY;
|
||
|
|
||
|
int Action_ready;//码盘校准标志位
|
||
|
|
||
|
|
||
|
}Action_POS_t;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
int8_t ACTIONRECV_Init(Action_POS_t*pos);
|
||
|
|
||
|
int8_t ACTION_StartReceiving(void);
|
||
|
|
||
|
bool_t ACTION_WaitDmaCplt(void);
|
||
|
|
||
|
int8_t ACTION_Parse(Action_POS_t*pos);
|
||
|
|
||
|
int8_t ACTION_DataRefresh(Action_POS_t*pos);
|
||
|
|
||
|
int8_t Action_HandleOffline(Action_POS_t *pos);
|
||
|
|
||
|
void ACT_UpdateXY(float pos_x,float pos_y);
|
||
|
|
||
|
void ACT_ZeroClear(void);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
#endif
|
||
|
|