/* * BHBF_ROBOT.h * * Created on: Oct 26, 2023 * Author: shiya */ #ifndef INC_BHBF_ROBOT_H_ #define INC_BHBF_ROBOT_H_ #include #include #include #include #include #include #include "BHBF_ROBOT.h" #include "bsp_PV.pb.h" #include "bsp_IV.pb.h" #include "BSP/pb.h" #include "BSP/pb_decode.h" #include "BSP/pb_encode.h" #include "BSP/bsp_EEPROM.h" #include "BSP/bsp_pb_decode_encode.h" #include "bsp_MB_host.h" #include "BSP/bsp_include.h" #include "BSP/bsp_UART.h" #include "bsp_FDCAN.h" #include "BSP/DLTuc.h" #include "BSP/bsp_DLT_Log.h" #include "BSP/bsp_UDP.h" #include "BSP/tcp_server.h" #include "BSP/bsp_cpu_flash.h" #include "BSP/bsp_qspi_w25q128.h" #include "BSP/bsp_UpperComputer_Handler.h" #include "BSP/bsp_Error_Detect.h" #include "BSP/bsp_MB_host.h" #include "MSP/msp_JTBATTERY.h" #include "MSP/msp_LeiSai_ISV2_CAN.h" #include "MSP/msp_Force_Sensor.h" #include "MSP/msp_TL720D.h" #include "MSP/msp_MK32_1.h" #include "MSP/msp_Force_Sensor.h" #include "MSP/msp_WH_LTE_7S0.h" #include "msp_K1061DC.h" #include "msp_wire_sensor.h" #include "msp_Wire_Motor_C20.h" #include "MSP/msp_UWB_20.h" #include "motors.h" #include "paint_gun_action.h" #include "motors_power_action.h" #include "robot_move_actions.h" #include "blowers_pwm_action.h" // 风机 #include "fsm_state_control.h" #include "fsm_state.h" #include "change_line_control.h" #include "Automatic_task_Control.h" #include "MSP/msp_PID.h" //#include "robot_state.h" //FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 896K //#define VECT_TAB_OFFSET 0x00020000U #define DLTViewer 1 bool CompareTimer_Delay(int32_t Delay); extern GV_struct_define GV; extern IV_struct_define IV; //串口发送到遥控数据 extern CV_struct_define CV; // extern PV_struct_define decoded_PV; //串口从遥控接收数据 typedef struct sys_timer_handler { int start_timer; int sys_current_timer_count; int sys_timer_flag; }Sys_timer_handler; extern Sys_timer_handler timer_handler_1; extern Sys_timer_handler timer_handler_2; extern Sys_timer_handler timer_handler_3; extern Sys_timer_handler timer_handler_4; //first start Timer, then WaitTimer bool CompareTimer(int32_t DelayMiliSeconds,Sys_timer_handler * timer_handler); void SystemTimer_Intialize(); void GF_Timer_Count(); void GF_Robot_Init(void); void GF_Robot_MainLoop(void); void GF_WatchDog_Loop(void); extern void SET_BIT_1(int32_t* num,int32_t k); extern void SET_BIT_0(int32_t* num,int32_t k); extern int32_t Get_BIT(int32_t* num,int32_t k); //A &= ~(1 << bit) extern int32_t* SystemErrorCode; extern ErrorData* SystemErrorData; //Error Bit Define #define AngleEncoderErrorBitFlag 0 #define DAM_Relay_ErrorBitFlag 1 #define DH_CAN_Remote_Controller_1E4 2 #define DH_CAN_Remote_Controller_2E4 3 #define DH_Remote 4 #define force_sensor 5 #define LeiSai_ISV2CAN 6 #define mk32_sbus 7 #define steering_engine 8 #define Weld_seam_Tracking 9 #define Ti5_1 11 #define Ti5_2 12 #define Ti5_3 13 #define Ti5_4 14 #define Ti5_5 15 #define Ti5_6 16 #define TL720D 17 #define ZQ_CAN_ID1_LeftMotor 18 #define ZQ_CAN_ID2_RightMotor 19 #define ZQ_CAN_ID3_SwingMotor 20 #define wire_sensor 21 #define DHRougheningController 22 #define DAM040D_Relay_ErrorBitFlag 23 #define DMAKE_1 24 #define DMAKE_2 25 #define DMAKE_3 26 #define pressure_sensor 27 #define IV_Run_Mode_Maunal 0 #define IV_Run_Mode_Automation 1 #define IV_Run_Mode_EmergencyStop 2 #define IV_Run_Mode_Vertical_LaneChange 3 #define IV_Run_Mode_Horizontal_LaneChange 4 #define IV_Run_Mode_Forward 5 #define IV_Run_Mode_BackWard 6 #define IV_Run_Mode_TurnLeft 7 #define IV_Run_Mode_TurnRight 8 #define IV_Run_Mode_HALT 9 //extern LS_MotorParameters* Frames_Motor[4]; #endif /* INC_BHBF_ROBOT_H_ */