Skip to content

Commit

Permalink
Fixed end of download detection based on new AcquisitionStopped() hel…
Browse files Browse the repository at this point in the history
…per method on Oscilloscope.

Fixed looping on PollTrigger() when scope is in Run mode.
  • Loading branch information
fredzo committed Oct 9, 2024
1 parent b419a0b commit 1d6cd5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ngscopeclient/InstrumentThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void InstrumentThread(InstrumentThreadArgs args)
{ // Check for trigger state change
auto stat = scope->PollTrigger();
session->GetInstrumentConnectionState(inst)->m_lastTriggerState = stat;
if(stat == Oscilloscope::TRIGGER_MODE_STOP)
if(stat == Oscilloscope::TRIGGER_MODE_STOP || stat == Oscilloscope::TRIGGER_MODE_RUN || stat == Oscilloscope::TRIGGER_MODE_TRIGGERED)
{ // Final state
triggerUpToDate = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ngscopeclient/StreamBrowserDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ bool StreamBrowserDialog::DoRender()
{
renderBadge(ImVec4(0.4, 0.4, 0.4, 1.0) /* XXX: pull color from prefs */, "disabled", "disa", NULL);
}
else if (state && state->m_lastTriggerState != Oscilloscope::TRIGGER_MODE_STOP)
else if (state)
{
renderDownloadProgress(inst, chan);
}
Expand Down

0 comments on commit 1d6cd5b

Please sign in to comment.