Made the TargetController refuse commands that require the target to be stopped, when the target is running
This commit is contained in:
@@ -289,7 +289,7 @@ namespace Bloom::TargetController
|
||||
}
|
||||
|
||||
if (command->requiresStoppedTargetState() && this->lastTargetState != TargetState::STOPPED) {
|
||||
this->target->stop();
|
||||
throw Exception("Illegal target state - command requires target to be stopped");
|
||||
}
|
||||
|
||||
this->registerCommandResponse(
|
||||
@@ -494,6 +494,7 @@ namespace Bloom::TargetController
|
||||
|
||||
if (this->target->getState() != TargetState::RUNNING) {
|
||||
this->target->run();
|
||||
this->lastTargetState = TargetState::RUNNING;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user