Sfoglia il codice sorgente

svpwm加入溢出保护

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 3 anni fa
parent
commit
e1682a4cf5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Applications/foc/core/svpwm.c

+ 1 - 1
Applications/foc/core/svpwm.c

@@ -524,7 +524,7 @@ void SVM_Duty_Fix(AB_t *alb, s16q5_t vbus, u32 PWM_half_period, FOC_OutP *out) {
 }
 
 #else
-#if 0
+#if 1
 #define Duty_Sat(max, t1, t2) \
 	do { \
 		if (t1+t2 > max) { \