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.
207 lines
5.5 KiB
207 lines
5.5 KiB
/*
|
|
* msp_DH_Roughening.h
|
|
*
|
|
* Created on: Nov 22, 2024
|
|
* Author: akeguo
|
|
*/
|
|
|
|
#ifndef INC_MSP_MSP_DH_ROUGHENING_H_
|
|
#define INC_MSP_MSP_DH_ROUGHENING_H_
|
|
#include "../../BASE/Inc/BSP/bsp_include.h"
|
|
|
|
//typedef struct _DHRoughening
|
|
//{
|
|
//
|
|
// uint16_t Forward_Backward_Speed;
|
|
// uint16_t Left_Right_Turn_Speed;
|
|
// uint16_t Left_Compensation;
|
|
// uint16_t Right_Compensation;
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
// 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 Roughening_Start :1;//拉毛开启
|
|
// uint16_t Roughening_Stop :1;//拉毛关闭
|
|
// uint16_t LaneChangeDistance_0 :1;//换道距离0 -5
|
|
// uint16_t LaneChangeDistance_1 :1;//
|
|
// uint16_t LaneChangeDistance_2 :1;//
|
|
// uint16_t LaneChangeDistance_3 :1;//
|
|
// uint16_t LaneChangeDistance_4 :1;//
|
|
// uint16_t LaneChangeDistance_5 :1;//
|
|
|
|
// uint16_t Horizontal_Task :1;//水平作业
|
|
// uint16_t Vertical_Task :1;//竖直作业
|
|
// uint16_t LaneChange_Up_Left :1;//左上换道
|
|
// uint16_t LaneChange_Right_Down :1;//右下换道
|
|
// uint16_t NULL0 :1;//
|
|
// uint16_t NULL1 :1;//
|
|
// uint16_t End_Up :1;//前端上升
|
|
// uint16_t End_Down :1;//前端下降
|
|
|
|
//}DHRoughening;
|
|
|
|
|
|
|
|
|
|
//typedef struct _DHRoughening
|
|
//{
|
|
//
|
|
// uint16_t Forward_Backward_Speed;
|
|
// uint16_t Left_Right_Turn_Speed;
|
|
// uint16_t Left_Compensation;
|
|
// uint16_t Right_Compensation;
|
|
//
|
|
// 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;
|
|
//
|
|
// 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 Roughening_Start :1;//拉毛开启
|
|
// uint16_t Roughening_Stop :1;//拉毛关闭
|
|
// uint16_t NULLValue :6;//换道距离0 -5
|
|
//
|
|
// uint16_t Horizontal_Task :1;//水平作业
|
|
// uint16_t Vertical_Task :1;//竖直作业
|
|
// uint16_t LaneChange_Vertical_Up :1;//竖直上换道
|
|
// uint16_t LaneChange_Vertical_Down :1;//竖直下换道
|
|
// uint16_t LaneChange_Horizontal_Left :1;//水平左换道
|
|
// uint16_t LaneChange_Horizontal_Right:1;//水平右左换道
|
|
// uint16_t End_Up :1;//前端上升
|
|
// uint16_t End_Down :1;//前端下降
|
|
//
|
|
//
|
|
//}DHRoughening;
|
|
|
|
//typedef struct _DHRoughening
|
|
//{
|
|
//
|
|
// uint16_t Forward_Backward_Speed;
|
|
// uint16_t Left_Right_Turn_Speed;
|
|
// uint16_t Left_Compensation;
|
|
// uint16_t Right_Compensation;
|
|
//
|
|
// 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;
|
|
//
|
|
// 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 Roughening_Start :1;//拉毛开启
|
|
// uint16_t Roughening_Stop :1;//拉毛关闭
|
|
// uint16_t NULLValue :6;//换道距离0 -5
|
|
//
|
|
// uint16_t Horizontal_Task :1;//水平作业
|
|
// uint16_t Vertical_Task :1;//竖直作业
|
|
// uint16_t LaneChange_Horizontal_Left :1;//水平左换道
|
|
// uint16_t LaneChange_Horizontal_Right :1;//水平右换道
|
|
// uint16_t End_Up :1;//前端上升
|
|
// uint16_t End_Down:1;//前端下降
|
|
// uint16_t LaneChange_Vertical_Up :1;//竖直上换道
|
|
// uint16_t LaneChange_Vertical_Down :1;//竖直下换道
|
|
//
|
|
//
|
|
//}DHRoughening;
|
|
|
|
|
|
typedef struct _DHRoughening
|
|
{
|
|
|
|
uint16_t Forward_Backward_Speed;
|
|
uint16_t Left_Right_Turn_Speed;
|
|
uint16_t Left_Compensation;
|
|
uint16_t Right_Compensation;
|
|
|
|
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;
|
|
|
|
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 Roughening_Start :1;//拉毛开启
|
|
uint16_t Roughening_Stop :1;//拉毛关闭
|
|
uint16_t NULLValue :6;//换道距离0 -5
|
|
|
|
uint16_t Horizontal_Task :1;//水平作业
|
|
uint16_t Vertical_Task :1;//竖直作业
|
|
uint16_t LaneChange_Horizontal_Left :1;//水平左换道
|
|
uint16_t LaneChange_Horizontal_Right :1;//水平右换道
|
|
uint16_t End_Down:1;//前端下降
|
|
uint16_t End_Up :1;//前端上升
|
|
uint16_t LaneChange_Vertical_Up :1;//竖直上换道
|
|
uint16_t LaneChange_Vertical_Down :1;//竖直下换道
|
|
|
|
|
|
}DHRoughening;
|
|
|
|
|
|
|
|
|
|
extern DHRoughening DHRougheningContrller;
|
|
|
|
|
|
void read_DHRoughening_Data(void);
|
|
void decode_DHRoughening(uint8_t *buffer, uint16_t length);
|
|
void set_DHRoughening_Display(uint16_t LeftCompensation, uint16_t RightCompensation,
|
|
uint16_t Angle, uint16_t Speed);
|
|
void send_to_DHRoughening();
|
|
|
|
|
|
int32_t DHRougheningGetSpeed(DHRoughening DHRougheningContrller);
|
|
int32_t DHRougheningGetLaneChangeDistance(DHRoughening DHRougheningContrller);
|
|
#endif /* INC_MSP_MSP_DH_ROUGHENING_H_ */
|
|
|