Removed TC state code from insight and debug server components

This commit is contained in:
Nav
2023-05-25 22:43:49 +01:00
parent 3540228f6d
commit 9475a80cd0
7 changed files with 0 additions and 80 deletions

View File

@@ -75,10 +75,6 @@ namespace Bloom
Logger::info("Starting Insight");
this->setThreadState(ThreadState::STARTING);
this->eventListener.registerCallbackForEventType<Events::TargetControllerStateChanged>(
std::bind(&Insight::onTargetControllerStateChangedEvent, this, std::placeholders::_1)
);
this->eventListener.registerCallbackForEventType<Events::TargetExecutionStopped>(
std::bind(&Insight::onTargetStoppedEvent, this, std::placeholders::_1)
);
@@ -350,33 +346,6 @@ namespace Bloom
);
}
void Insight::onTargetControllerStateChangedEvent(const Events::TargetControllerStateChanged& event) {
using TargetController::TargetControllerState;
if (event.state == TargetControllerState::SUSPENDED) {
emit this->insightSignals->targetControllerSuspended();
return;
}
if (event.state == TargetControllerState::ACTIVE) {
const auto getTargetDescriptorTask = QSharedPointer<GetTargetDescriptor>(
new GetTargetDescriptor(),
&QObject::deleteLater
);
QObject::connect(
getTargetDescriptorTask.get(),
&GetTargetDescriptor::targetDescriptor,
this,
[this] (Targets::TargetDescriptor targetDescriptor) {
emit this->insightSignals->targetControllerResumed(targetDescriptor);
}
);
InsightWorker::queueTask(getTargetDescriptorTask);
}
}
void Insight::onProgrammingModeEnabledEvent(const Events::ProgrammingModeEnabled& event) {
emit this->insightSignals->programmingModeEnabled();
}