#include "shoot_task.h" #include "TopDefine.h" #include "FreeRTOS.h" #include "attrTask.h" #include #include "shoot_task.h" #include "odrive_shoot.h" #include "remote_control.h" extern RC_mess_t RC_mess; const odrive_msg_t *odrive_msg1; void Task_Shoot(void *argument) { (void)argument; /* 未使用argument,消除警告 */ // const uint32_t delay_tick = osKernelGetTickFreq() / TASK_FREQ_CAN; // odrive_CB(); // uint32_t tick = osKernelGetTickCount(); /* 控制任务运行频率的计算 */ while(1) { shootStep(); odrive_get_encode(AXIS0_NODE); odrive_msg1 = Get_Odrive_Point(); osDelay(2); // tick += delay_tick; /* 计算下一个唤醒时刻 */ // osDelayUntil(tick); /* 运行结束,等待下一个周期唤醒 */ } }