added possibility to change max speeds in

manualControl
This commit is contained in:
2023-05-11 22:15:34 +02:00
parent ed39cdb874
commit 68b7364cbe
3 changed files with 58 additions and 6 deletions
@@ -62,6 +62,9 @@ class ManualControl : public DriveModi {
* @param maxSpeed in m/s
*/
void setMaxSpeed(double maxSpeed) { max_speed = maxSpeed; }
void increaseMaxSpeed(double increase = 0.1) { max_speed += increase; }
void decreaseMaxSpeed(double increase = 0.1) { max_speed -= increase; }
double getMaxSpeed() { return this->max_speed; }
/**
* @brief Set the max rotation
@@ -69,6 +72,9 @@ class ManualControl : public DriveModi {
* @param maxRotation in rad/s (maybe)
*/
void setMaxRotation(double maxRotation) { max_rotation = maxRotation; }
void increaseMaxRotation(double increase = 0.1) { max_rotation += increase; }
void decreaseMaxRotation(double increase = 0.1) { max_rotation -= increase; }
double getMaxRotation() { return this->max_rotation; }
protected:
MoveControl *moveControl;