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: LSM9DS1 RangeFinder FastPWM
Dependents: PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board ... more
Diff: PositionController.cpp
- Revision:
- 9:583dbd17e0ba
- Parent:
- 8:6b747ad59ff5
- Child:
- 10:fe74e8909d3f
--- a/PositionController.cpp Mon Apr 19 15:54:15 2021 +0000 +++ b/PositionController.cpp Tue Aug 31 15:38:44 2021 +0000 @@ -4,8 +4,8 @@ const float PositionController::TS = 0.001f; // period of 1 ms const float PositionController::LOWPASS_FILTER_FREQUENCY = 100.0f; // given in [rad/s] -const float PositionController::MIN_DUTY_CYCLE = 0.0f; // minimum duty-cycle -const float PositionController::MAX_DUTY_CYCLE = 1.0f; // maximum duty-cycle +const float PositionController::MIN_DUTY_CYCLE = 0.02f; // minimum duty-cycle +const float PositionController::MAX_DUTY_CYCLE = 0.98f; // maximum duty-cycle PositionController::PositionController(float counts_per_turn, float kn, float max_voltage, FastPWM& pwm, EncoderCounter& encoderCounter) : pwm(pwm), encoderCounter(encoderCounter), thread(osPriorityHigh, 4096) {