Преглед изворни кода

用户设置的idc limit小于零,不处理,通过这个设置可以读取当前的限流

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui пре 3 година
родитељ
комит
ef4d3b963a
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Applications/foc/motor/motor.c

+ 1 - 1
Applications/foc/motor/motor.c

@@ -411,7 +411,7 @@ bool mc_set_cruise_speed(bool rpm_abs, float target_rpm) {
 }
 
 void mc_set_idc_limit(s16 limit) {
-	if (limit == motor.idc_user_lim) {
+	if ((limit == motor.idc_user_lim) || (limit < 0)) {
 		return;
 	}
 	motor.idc_user_lim = limit;