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.
Diff: main.cpp
- Revision:
- 242:ac30f04fd6f7
- Parent:
- 240:2aaffa217627
- Child:
- 243:96b03b3bf3ef
--- a/main.cpp Sun Nov 11 15:09:30 2018 +0000 +++ b/main.cpp Mon Nov 12 10:58:59 2018 +0000 @@ -62,9 +62,9 @@ w_ref = control.user_cmd * _W_SETPOINT_MAX; w_err = w_ref - read.w; control.w_integral += w_err * KI_W; - control.w_integral = constrain(control.w_integral, -1.0f, 1.0f); + control.w_integral = constrain(control.w_integral, -0.1f, 0.1f); control.torque_percent = KP_W * w_err + control.w_integral; - control.torque_percent = constrain(control.torque_percent, -1.0f, 1.0f); + control.torque_percent = constrain(control.torque_percent, -0.1f, 0.1f); break; case OP_POSITION: break;