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: Encoder HIDScope MODSERIAL QEI biquadFilter mbed
Diff: main.cpp
- Revision:
- 20:bdc62ee49197
- Parent:
- 19:c6dc35b4cc0c
- Child:
- 21:c75210216204
--- a/main.cpp Thu Oct 08 10:42:24 2015 +0000 +++ b/main.cpp Thu Oct 08 12:14:00 2015 +0000 @@ -164,10 +164,7 @@ pwm_motor_turn_D = error_derivative_turn*Gain_D_turn; // output D controller to pwm pwm_to_motor_turn = pwm_motor_turn_P + pwm_motor_turn_I + pwm_motor_turn_D; - -// -// double pwm_to_motor_turn = pwm_motor_turn_P + pwm_motor_turn_I + pwm_motor_turn_D; // Total output PID controller to pwm -// + // Keep Pwm between -1 and 1 keep_in_range(&pwm_to_motor_turn, -1,1); // Pass to motor controller but keep it in range!