diff --git a/src/TargetController/TargetControllerComponent.cpp b/src/TargetController/TargetControllerComponent.cpp index afab195e..95742ac3 100644 --- a/src/TargetController/TargetControllerComponent.cpp +++ b/src/TargetController/TargetControllerComponent.cpp @@ -513,11 +513,12 @@ namespace TargetController } this->target->setDebugTool(this->debugTool.get()); - this->targetDescriptor = std::make_unique(this->target->targetDescriptor()); Logger::info("Activating target"); this->target->activate(); Logger::info("Target activated"); + + this->targetDescriptor = std::make_unique(this->target->targetDescriptor()); Logger::info("Target name: " + this->targetDescriptor->name); this->target->postActivate(); diff --git a/src/Targets/Target.hpp b/src/Targets/Target.hpp index 27d2a508..08118f96 100644 --- a/src/Targets/Target.hpp +++ b/src/Targets/Target.hpp @@ -85,7 +85,10 @@ namespace Targets virtual void postActivate() = 0; /** - * Should generate a TargetDescriptor for the current target. + * Should generate a TargetDescriptor for the target. + * + * This function is called shortly after target activation, allowing for information that was obtained via + * probing/discovery to be used in the target descriptor. * * @return */