added dutyCycle to menuManualControl

This commit is contained in:
2023-05-22 22:10:54 +02:00
parent 77b7eeae92
commit a310be0f6c
6 changed files with 25 additions and 3 deletions
@@ -42,6 +42,16 @@ void MenuManualControl::printPage() const {
lineOne.concat(this->manualControl->getMaxRotation());
lineTwo = "Decrease by 0.1";
break;
case 5:
lineOne = "Dutycycle Left:";
lineTwo.concat(this->manualControl->getDutycycleLeft());
break;
case 6:
lineOne = "Dutycycle Right:";
lineTwo.concat(this->manualControl->getDutycycleRight());
break;
default:
this->printDefault();
@@ -55,7 +65,8 @@ void MenuManualControl::init() {
this->firstPrint = false;
this->driveManager->changeModus(Modi::ManualControl);
this->manualControl = (ManualControl*) this->driveManager->getDriveModiPtr();
this->setCountPages(5);
this->setCountPages(7);
this->updateDelay = 500;
}
void MenuManualControl::runCommand() const {
@@ -76,6 +76,9 @@ class ManualControl : public DriveModi {
void decreaseMaxRotation(double increase = 0.1) { max_rotation -= increase; }
double getMaxRotation() { return this->max_rotation; }
uint16_t getDutycycleLeft() const { return this->moveControl->getDutycycleLeft(); }
uint16_t getDutycycleRight() const { return this->moveControl->getDutycycleRight(); }
protected:
MoveControl *moveControl;
const ControlPadInput* input;
+1 -1
View File
@@ -123,7 +123,7 @@ void MoveControl::emergencyStop() {
}
void MoveControl::setSpeed(double speed) {
if (speed < 0.1 && speed > -0.1) {
if (speed < 0.2 && speed > -0.2) {
this->x_speed = 0;
return;
}