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
Diff: FOC/foc.cpp
- Revision:
- 51:6cd89bd6fcaa
- Parent:
- 49:83d83040ea51
- Child:
- 55:14ac00a5f43d
diff -r ba72df25d10f -r 6cd89bd6fcaa FOC/foc.cpp
--- a/FOC/foc.cpp Thu Apr 04 13:53:58 2019 +0000
+++ b/FOC/foc.cpp Wed Jul 17 03:40:12 2019 +0000
@@ -165,7 +165,7 @@
/// Field Weakening ///
controller->fw_int += .001f*(0.5f*OVERMODULATION*controller->v_bus - controller->v_ref);
- controller->fw_int = fmaxf(fminf(controller->fw_int, 0.0f), -I_MAX_FW);
+ controller->fw_int = fmaxf(fminf(controller->fw_int, 0.0f), -I_FW_MAX);
controller->i_d_ref = controller->fw_int;
//float i_cmd_mag_sq = controller->i_d_ref*controller->i_d_ref + controller->i_q_ref*controller->i_q_ref;
limit_norm(&controller->i_d_ref, &controller->i_q_ref, I_MAX);