Replaced nasty onInsightStateChangedEvent event handler in TargetController with new GetTargetState command

This commit is contained in:
Nav
2022-04-28 21:06:57 +01:00
parent 5a8aa3d657
commit fa037a81b1
11 changed files with 40 additions and 27 deletions

View File

@@ -922,19 +922,6 @@ namespace Bloom::TargetController
}
}
// TODO: remove this
void TargetControllerComponent::onInsightStateChangedEvent(const Events::InsightThreadStateChanged& event) {
if (event.getState() == ThreadState::READY) {
/*
* Insight has just started up.
*
* Refresh the target state and kick off a target stop/resume execution event. Setting the lastTargetState
* to UNKNOWN will be enough to do this. See TargetControllerComponent::fireTargetEvents().
*/
this->lastTargetState = TargetState::UNKNOWN;
}
}
void TargetControllerComponent::onRetrieveTargetPinStatesEvent(const Events::RetrieveTargetPinStates& event) {
try {
if (this->target->getState() != TargetState::STOPPED) {