Explorar el Código

增加解锁电机的处理

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui hace 3 años
padre
commit
c3b5aa9b44
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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;
 }