ares

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
32:ccac5da77844
Parent:
31:61eb6ae28215
Child:
34:51647c6c500d
--- a/FOC/foc.cpp	Wed Aug 30 15:28:40 2017 +0000
+++ b/FOC/foc.cpp	Wed Aug 30 18:05:37 2017 +0000
@@ -130,9 +130,9 @@
             TIM1->CCR1 = (PWM_ARR)*(1.0f-controller->dtc_w);
         }
         else{
-            TIM1->CCR3 = (PWM_ARR>>1)*(1.0f-controller->dtc_u);
-            TIM1->CCR1 = (PWM_ARR>>1)*(1.0f-controller->dtc_v);
-            TIM1->CCR2 =  (PWM_ARR>>1)*(1.0f-controller->dtc_w);
+            TIM1->CCR3 = (PWM_ARR)*(1.0f-controller->dtc_u);
+            TIM1->CCR1 = (PWM_ARR)*(1.0f-controller->dtc_v);
+            TIM1->CCR2 =  (PWM_ARR)*(1.0f-controller->dtc_w);
         }
 
        controller->theta_elec = theta;                                          //For some reason putting this at the front breaks thins