소스 검색

增加解锁电机的处理

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 3 년 전
부모
커밋
c3b5aa9b44
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      Applications/foc/motor/motor.c

+ 5 - 0
Applications/foc/motor/motor.c

@@ -68,6 +68,11 @@ static u32 _self_check_task(void *p) {
 			mc_lock_motor(true);
 		}
 	}
+	if (motor.b_lock_motor) {
+		if (!mc_is_gpio_mlock()) {
+			mc_lock_motor(false);
+		}
+	}
 	return 5;
 }