PM2_Lib
Dependencies: LSM9DS1 RangeFinder FastPWM
Diff: PositionController.cpp
- Revision:
- 19:518ed284d98b
- Parent:
- 10:fe74e8909d3f
diff -r 21c0a669d6ef -r 518ed284d98b PositionController.cpp --- a/PositionController.cpp Tue Mar 22 08:33:25 2022 +0000 +++ b/PositionController.cpp Tue Mar 22 08:35:07 2022 +0000 @@ -2,8 +2,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.02f; // minimum duty-cycle -const float PositionController::MAX_DUTY_CYCLE = 0.98f; // maximum duty-cycle +const float PositionController::MIN_DUTY_CYCLE = 0.01f; // minimum duty-cycle +const float PositionController::MAX_DUTY_CYCLE = 0.99f; // 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) {