bug fix static in motor und speed
This commit is contained in:
@@ -16,6 +16,7 @@ DriveManager::DriveManager(MoveControl *moveControl) {
|
||||
}
|
||||
|
||||
void DriveManager::loop() {
|
||||
this->moveControl->loop();
|
||||
if (currentModus)
|
||||
this->currentModus->loop();
|
||||
}
|
||||
@@ -31,11 +32,12 @@ void DriveManager::nextModus() {
|
||||
void DriveManager::changeModus(Modi modus) {
|
||||
|
||||
//Set moveControl to a safe state
|
||||
delete this->currentModus;
|
||||
|
||||
this->moveControl->setSpeed(0);
|
||||
this->moveControl->setRotationspeed(0);
|
||||
this->moveControl->setDrivingStatus(DrivingStatus::stop);
|
||||
delete this->currentModus;
|
||||
|
||||
|
||||
switch (modus) {
|
||||
case Modi::Off:
|
||||
this->currentModus = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user