diff --git a/lib/Romi32U4Motors/src/Romi32U4MotorTemplate.h b/lib/Romi32U4Motors/src/Romi32U4MotorTemplate.h index afdb82a..ac56a29 100644 --- a/lib/Romi32U4Motors/src/Romi32U4MotorTemplate.h +++ b/lib/Romi32U4Motors/src/Romi32U4MotorTemplate.h @@ -25,14 +25,17 @@ protected: volatile CTRL_MODE ctrlMode = CTRL_DIRECT; // TODO: After you tune your motors, set the gains here. - float Kp = 1; - float Ki = 0; + float Kp = 2.50; + float Ki = 0.03; float Kd = 0; - float Kf = 0; + float Kf = 3.00; // Used to keep track of the target speed, in counts / interval. float targetSpeed = 0; + // maximum accelration in counts/interval + float TRAPEZOIDAL_RAMP_RATE = 0; + /** * This is the speed of the motor, in "encoder counts / encoder interval". * The encoder interval is set in Robot::InitializeMotorControlTimer.