Used new TargetControllerConsole::getProgramCounter() member function to retrieve the PC upon a TargetReset event being fired (as opposed to just hard-coding the PC)

This commit is contained in:
Nav
2022-05-01 19:40:50 +01:00
parent 554d4607c5
commit 2c58103208

View File

@@ -121,10 +121,10 @@ namespace Bloom
}
void InsightWorker::onTargetResetEvent(const Events::TargetReset& event) {
// TODO: Pull PC from target. This will be done as part of the TC refactor (https://github.com/navnavnav/Bloom/issues/25)
this->lastTargetState = TargetState::STOPPED;
emit this->targetStateUpdated(TargetState::RUNNING);
emit this->targetStateUpdated(TargetState::STOPPED);
emit this->targetProgramCounterUpdated(0);
emit this->targetProgramCounterUpdated(this->targetControllerConsole.getProgramCounter());
}
void InsightWorker::onTargetRegistersWrittenEvent(const Events::RegistersWrittenToTarget& event) {