Sfoglia il codice sorgente

增加解锁电机的处理

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 3 anni fa
parent
commit
c3b5aa9b44
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  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;
 }