Przeglądaj źródła

autohold 成功后蜂鸣器再滴一下

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 3 lat temu
rodzic
commit
13c0420f0b
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      Applications/foc/motor/motor.c

+ 3 - 2
Applications/foc/motor/motor.c

@@ -622,8 +622,9 @@ static void mc_autohold_process(void) {
 			motor.n_autohold_time = get_tick_ms();
 		}else {
 			if (get_delta_ms(motor.n_autohold_time) >= CONFIG_AUTOHOLD_DETECT_TIME) {
-				mc_auto_hold(true);
-				shark_timer_post(&_autohold_beep_timer, 0);
+				if (mc_auto_hold(true)) {
+					shark_timer_post(&_autohold_beep_timer, 0);
+				}
 			}
 		}
 	}else {