Ver código fonte

hl20200525,代码以zzw_sift_wheel为基础,在雷达excute增加check_laser的判断.

huli 5 anos atrás
pai
commit
70a0ff3061
1 arquivos alterados com 7 adições e 1 exclusões
  1. 7 1
      laser/LivoxLaser.cpp

+ 7 - 1
laser/LivoxLaser.cpp

@@ -68,7 +68,12 @@ Error_manager CLivoxLaser::execute_task(Task_Base* p_laser_task)
 
 	//检查雷达状态
 	t_error = check_laser();
-	if ( t_error == SUCCESS )
+	if ( t_error != SUCCESS )
+	{
+		t_result.compare_and_cover_error(t_error);
+		return t_result;
+	}
+	else
 	{
 		//接受任务,并将任务的状态改为TASK_SIGNED已签收
 		mp_laser_task = (Laser_task *) p_laser_task;
@@ -116,6 +121,7 @@ Error_manager CLivoxLaser::execute_task(Task_Base* p_laser_task)
 		}
 	}
 
+
 	//返回错误码
 	if (t_result != Error_code::SUCCESS)
 	{