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()) switch (ke->key())
{ {
case Qt::Key_S: case Qt::Key_S:
if (_session->is_working()) _sampling_bar->run_or_stop();
_session->stop_capture();
else
_session->start_capture(false);
break; break;
case Qt::Key_I: case Qt::Key_I:
if (_session->is_working()) _sampling_bar->run_or_stop_instant();
_session->stop_capture();
else
_session->start_capture(true);
break; break;
case Qt::Key_T: case Qt::Key_T:
if (_device_agent->get_work_mode() == DSO) if (_device_agent->get_work_mode() == DSO)

View File

@ -1224,5 +1224,16 @@ namespace pv
_mode_button.setIcon(QIcon(iconPath + "/modes.svg")); _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 toolbars
} // namespace pv } // namespace pv

View File

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