2022-12-09 18:25:35 +08:00
|
|
|
#include "bsp_init.h"
|
2022-11-27 18:54:27 +08:00
|
|
|
#include "robot.h"
|
|
|
|
#include "robot_def.h"
|
|
|
|
|
|
|
|
#if defined(ONE_BOARD) || defined(CHASSIS_BOARD)
|
|
|
|
#include "chassis.h"
|
2022-12-04 13:49:08 +08:00
|
|
|
#endif
|
2022-11-27 18:54:27 +08:00
|
|
|
#if defined(ONE_BOARD) || defined(GIMBAL_BOARD)
|
|
|
|
#include "gimbal.h"
|
|
|
|
#include "shoot.h"
|
2022-12-04 13:49:08 +08:00
|
|
|
#include "robot_cmd.h"
|
|
|
|
#endif
|
2022-12-03 15:20:17 +08:00
|
|
|
|
2022-11-27 18:54:27 +08:00
|
|
|
void RobotInit()
|
|
|
|
{
|
2022-12-09 18:25:35 +08:00
|
|
|
BSPInit();
|
2022-11-27 18:54:27 +08:00
|
|
|
|
|
|
|
#if defined(ONE_BOARD) || defined(GIMBAL_BOARD)
|
2023-01-01 17:32:22 +08:00
|
|
|
RobotCMDInit();
|
2022-12-03 15:20:17 +08:00
|
|
|
GimbalInit();
|
|
|
|
ShootInit();
|
2022-12-04 13:49:08 +08:00
|
|
|
#endif
|
2022-11-27 18:54:27 +08:00
|
|
|
|
|
|
|
#if defined(ONE_BOARD) || defined(CHASSIS_BOARD)
|
2022-12-11 14:59:45 +08:00
|
|
|
ChassisInit();
|
2022-12-04 13:49:08 +08:00
|
|
|
#endif
|
2022-12-11 14:59:45 +08:00
|
|
|
}
|
2022-11-27 18:54:27 +08:00
|
|
|
|
2022-12-11 14:59:45 +08:00
|
|
|
void RobotTask()
|
|
|
|
{
|
2022-11-27 18:54:27 +08:00
|
|
|
#if defined(ONE_BOARD) || defined(GIMBAL_BOARD)
|
2022-12-19 17:15:42 +08:00
|
|
|
RobotCMDTask();
|
2022-12-03 15:20:17 +08:00
|
|
|
GimbalTask();
|
|
|
|
ShootTask();
|
2022-12-04 13:49:08 +08:00
|
|
|
#endif
|
2022-12-11 14:59:45 +08:00
|
|
|
|
|
|
|
#if defined(ONE_BOARD) || defined(CHASSIS_BOARD)
|
|
|
|
ChassisTask();
|
|
|
|
#endif
|
2022-11-27 18:54:27 +08:00
|
|
|
}
|