You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
|
11 months ago
|
/*
|
||
|
|
* msp_DH_Remote_Controller.h
|
||
|
|
*
|
||
|
|
* Created on: Jul 31, 2024
|
||
|
|
* Author: akeguo
|
||
|
|
*/
|
||
|
|
|
||
|
|
#ifndef INC_MSP_MSP_DH_REMOTE_CONTROLLER_H_
|
||
|
|
#define INC_MSP_MSP_DH_REMOTE_CONTROLLER_H_
|
||
|
|
|
||
|
|
#include "BHBF_ROBOT.h"
|
||
|
|
#include "bsp_include.h"
|
||
|
|
//小端存储,和大段存储完全反过来了
|
||
|
|
struct DeChiMoveState
|
||
|
|
{
|
||
|
|
uint16_t Emergency_Stop :1;
|
||
|
|
uint16_t Wireless_State :1;
|
||
|
|
uint16_t Forwards :1;
|
||
|
|
uint16_t Backwards :1;
|
||
|
|
uint16_t Left_Turn :1;
|
||
|
|
uint16_t Right_Turn :1;
|
||
|
|
uint16_t Vehicle_Speed1 :1;
|
||
|
|
uint16_t Vehicle_Speed2 :1;
|
||
|
|
uint16_t Vehicle_Speed3 :1;
|
||
|
|
uint16_t Vehicle_Speed4 :1;
|
||
|
|
uint16_t Vehicle_Speed5 :1;
|
||
|
|
uint16_t Vehicle_Speed6 :1;
|
||
|
|
uint16_t Vehicle_Speed7 :1;
|
||
|
|
uint16_t Vehicle_Speed8 :1;
|
||
|
|
uint16_t Vehicle_Speed9 :1;
|
||
|
|
uint16_t Vehicle_Speed10 :1;
|
||
|
|
|
||
|
|
};
|
||
|
|
struct DeChiFunctionState
|
||
|
|
{
|
||
|
|
uint16_t Task_Start :1; //作业开启
|
||
|
|
uint16_t Task_Stop :1; //作业关闭
|
||
|
|
uint16_t Vertical_Upwards_Change :1; //竖直上换道
|
||
|
|
uint16_t Vertical_Downwards_Change :1; //竖直下换道
|
||
|
|
|
||
|
|
uint16_t Test_Start :1; //测试开始
|
||
|
|
uint16_t Test_Stop :1; //测试停止
|
||
|
|
uint16_t Open :1; //开启
|
||
|
|
uint16_t Close :1; //关闭
|
||
|
|
uint16_t Vehicle_speed10 :8; //没有用,只是为了占一个字节、8个位
|
||
|
|
};
|
||
|
|
|
||
|
|
extern struct DeChiMoveState *DeChiMoveCurrentState;
|
||
|
|
extern struct DeChiFunctionState *DeChiFunctionCurrentState;
|
||
|
|
|
||
|
|
extern uint16_t De_Chi_For_Back_Wards_Speed;
|
||
|
|
extern uint16_t De_Chi_Left_Rigth_Wards_Speed;
|
||
|
|
void read_DeChi_Data(void);
|
||
|
|
void decode_DeChi(uint8_t *buffer, uint16_t length);
|
||
|
|
void set_DeChi_Display(uint16_t Angle, uint16_t Speed);
|
||
|
|
|
||
|
|
#endif /* INC_MSP_MSP_DH_REMOTE_CONTROLLER_H_ */
|