Added requiresStoppedTargetState() member function to TargetController command classes.
The TargetController will use this to determine whether to stop the target before handling a given command.
This commit is contained in:
@@ -285,6 +285,10 @@ namespace Bloom::TargetController
|
||||
throw Exception("No handler registered for this command.");
|
||||
}
|
||||
|
||||
if (command->requiresStoppedTargetState() && this->lastTargetState != TargetState::STOPPED) {
|
||||
this->target->stop();
|
||||
}
|
||||
|
||||
this->registerCommandResponse(
|
||||
commandId,
|
||||
this->commandHandlersByCommandType.at(commandType)(*(command.get()))
|
||||
|
||||
Reference in New Issue
Block a user