Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-dev-f303 FastPWM3
Revision 52:50946a16216d, committed 2020-05-25
- 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 |
diff -r 6cd89bd6fcaa -r 50946a16216d FOC/foc.cpp --- 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; }