PM2_Lib

Dependencies:   LSM9DS1 RangeFinder FastPWM

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)
 {