/* * 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/bsp_TCPClient.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/DLTuc.h" #include "BSP/bsp_DLT_Log.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_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 "paint_gun_action.h" #include "fsm_state_control.h" #include "change_line_control.h" #include "fsm_state.h" #include "robot_move_actions.h" //#include "robot_state.h" //FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 896K //#define VECT_TAB_OFFSET 0x00020000U #define DLTViewer 1 extern 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; extern PV_struct_define decoded_PV_variable; 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 extern bool CompareTimer(int32_t DelayMiliSeconds,Sys_timer_handler * timer_handler); extern void SystemTimer_Intialize(); extern void GF_Timer_Count(); extern void GF_Robot_Init(void); extern void GF_Robot_MainLoop(void); extern void GF_WatchDog_Loop(void); extern int32_t speed_M_min_toE01_M_min(int32_t speedm_min); 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; #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]; extern int32_t SystemTimeMiliCount; //2ms加一 #endif /* INC_BHBF_ROBOT_H_ */