Replaced targetProgramCounterUpdated signal with new ReadProgramCounter Insight worker task.
Also some other bits of tidying
This commit is contained in:
@@ -229,9 +229,5 @@ namespace Bloom::Widgets
|
||||
|
||||
void RegisterWidget::onTargetStateChange(Targets::TargetState newState) {
|
||||
this->targetState = newState;
|
||||
|
||||
if (this->targetState == Targets::TargetState::RUNNING) {
|
||||
this->clearInlineValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,20 +115,6 @@ namespace Bloom::Widgets
|
||||
|
||||
itemLayout->addStretch(1);
|
||||
|
||||
QObject::connect(
|
||||
this,
|
||||
&PaneWidget::paneActivated,
|
||||
this,
|
||||
&TargetRegistersPaneWidget::postActivate
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
this,
|
||||
&PaneWidget::paneDeactivated,
|
||||
this,
|
||||
&TargetRegistersPaneWidget::postDeactivate
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
&insightWorker,
|
||||
&InsightWorker::targetStateUpdated,
|
||||
@@ -240,26 +226,15 @@ namespace Bloom::Widgets
|
||||
PaneWidget::resizeEvent(event);
|
||||
}
|
||||
|
||||
void TargetRegistersPaneWidget::postActivate() {
|
||||
if (this->targetState == Targets::TargetState::STOPPED) {
|
||||
this->refreshRegisterValues();
|
||||
}
|
||||
}
|
||||
|
||||
void TargetRegistersPaneWidget::postDeactivate() {
|
||||
|
||||
}
|
||||
|
||||
void TargetRegistersPaneWidget::onTargetStateChanged(Targets::TargetState newState) {
|
||||
if (this->targetState == newState) {
|
||||
return;
|
||||
}
|
||||
|
||||
using Targets::TargetState;
|
||||
this->targetState = newState;
|
||||
|
||||
if (newState == TargetState::STOPPED && this->state.activated) {
|
||||
this->refreshRegisterValues();
|
||||
if (this->targetState == Targets::TargetState::RUNNING) {
|
||||
this->clearInlineRegisterValues();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,4 +252,12 @@ namespace Bloom::Widgets
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TargetRegistersPaneWidget::clearInlineRegisterValues() {
|
||||
for (const auto& registerGroupWidget : this->registerGroupWidgets) {
|
||||
for (auto* registerWidget : registerGroupWidget->registerWidgets) {
|
||||
registerWidget->clearInlineValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,9 +44,6 @@ namespace Bloom::Widgets
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
|
||||
void postActivate();
|
||||
void postDeactivate();
|
||||
|
||||
private:
|
||||
const Targets::TargetDescriptor& targetDescriptor;
|
||||
InsightWorker& insightWorker;
|
||||
@@ -70,5 +67,6 @@ namespace Bloom::Widgets
|
||||
|
||||
void onTargetStateChanged(Targets::TargetState newState);
|
||||
void onRegistersRead(const Targets::TargetRegisters& registers);
|
||||
void clearInlineRegisterValues();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,17 +86,6 @@ namespace Bloom::Widgets::InsightTargetWidgets
|
||||
}
|
||||
|
||||
this->targetState = newState;
|
||||
|
||||
if (newState == TargetState::RUNNING) {
|
||||
this->setDisabled(true);
|
||||
|
||||
} else if (newState == TargetState::STOPPED) {
|
||||
this->refreshPinStates([this] {
|
||||
if (this->targetState == TargetState::STOPPED) {
|
||||
this->setDisabled(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void TargetPackageWidget::onProgrammingModeEnabled() {
|
||||
|
||||
Reference in New Issue
Block a user