ares

Dependencies:   mbed-dev-f303 FastPWM3

Files at this revision

API Documentation at this revision

Comitter:
guoyanhong
Date:
Mon May 25 00:51:54 2020 +0000
Parent:
51:6cd89bd6fcaa
Commit message:
modify foc.cpp

Changed in this revision

FOC/foc.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/FOC/foc.cpp	Wed Jul 17 03:40:12 2019 +0000
+++ b/FOC/foc.cpp	Mon May 25 00:51:54 2020 +0000
@@ -51,7 +51,7 @@
 
 void linearize_dtc(float *dtc){
     /// linearizes the output of the inverter, which is not linear for small duty cycles ///
-    float sgn = 1.0f-(2.0f*(dtc<0));
+    float sgn = 1.0f-(2.0f*(*dtc<0));
     if(abs(*dtc) >= .01f){
         *dtc = *dtc*.986f+.014f*sgn;
         }