fix: DSView get an incorrect acquisition duration by hot key 'S'

This commit is contained in:
dreamsourcelabTAI 2023-02-24 14:28:14 +08:00
parent bfe2b71b54
commit 7c652aec56
3 changed files with 17 additions and 8 deletions

View File

@ -1119,16 +1119,10 @@ namespace pv
switch (ke->key())
{
case Qt::Key_S:
if (_session->is_working())
_session->stop_capture();
else
_session->start_capture(false);
_sampling_bar->run_or_stop();
break;
case Qt::Key_I:
if (_session->is_working())
_session->stop_capture();
else
_session->start_capture(true);
_sampling_bar->run_or_stop_instant();
break;
case Qt::Key_T:
if (_device_agent->get_work_mode() == DSO)

View File

@ -1224,5 +1224,16 @@ namespace pv
_mode_button.setIcon(QIcon(iconPath + "/modes.svg"));
}
void SamplingBar::run_or_stop()
{
on_run_stop();
}
void SamplingBar::run_or_stop_instant()
{
on_instant_stop();
}
} // namespace toolbars
} // namespace pv

View File

@ -90,6 +90,10 @@ namespace pv
_view = view;
}
void run_or_stop();
void run_or_stop_instant();
signals:
void sig_store_session_data();