#include "Calc_task.h"
#include "cmsis_os.h"
#include "user_task.h"
#include "chassis.h"
#include "remote_control.h"
#include "map.h"
#include "usart.h"



////路径点选择
//void path_select(void)
//{

//  current_path = rc_ctrl.sw[2];
//	if(current_path!=last_path)
//	{
//		switch (current_path)
//	  {
//		//当前点
//	  case POINT_CURRENT:
////			chassis_pos->IS_SICK = 0;//不启用sick卡位
//			path_state.path = &path_current;//选择路径
//	    path_state.points_num = 1;//确定路径点数
//		  break;
//	  //左设定点
//	  case POINT_LEFT:
////			chassis_pos->IS_SICK = 0;//不启用sick卡位
//		  path_state.path = &path_left;//选择路径
//	    path_state.points_num = 1;//确定路径点数
////	    chassis_pos->sick.dis_set[2] = SICK_PATH_LEFT_Y;//sick设定值X轴赋值
////	    chassis_pos->sick.dis_set[3] = SICK_PATH_LEFT_X;//sick设定值Y轴赋值
//		  break;
//		//前设定点
//	  case POINT_FRONT:
////			chassis_pos->IS_SICK = 1;//启用sick卡位
//			path_state.path = &path_front;//选择路径
//	    path_state.points_num = 1;//确定路径点数
////      chassis_pos->sick.dis_set[2] = SICK_PATH_FRONT_Y;//sick设定值X轴赋值
////	    chassis_pos->sick.dis_set[3] = SICK_PATH_FRONT_X;//sick设定值Y轴赋值
//		  break;
//	  }
//		chassis_pos->POS_IS_CPT = NO;
////		chassis_pos->SICK_IS_CPT = NO;		
//	}
//   last_path = current_path;
//}
//计算任务
void Task_Calc(void *argument)
{
	(void)argument; /* 未使用argument，消除警告 */
	const uint32_t delay_tick = osKernelGetTickFreq() / TASK_FREQ_CALCULATE;
	uint32_t tick = osKernelGetTickCount(); /* 控制任务运行频率的计时 */
 while(1)
  {
		
   tick += delay_tick; /* 计算下一个唤醒时刻 */
   osDelayUntil(tick); /* 运行结束，等待下一次唤醒 */	
	}
	

	
}

