fix: Load form the dso file, it works as repeat mode

This commit is contained in:
dreamsourcelabTAI 2023-04-13 19:46:16 +08:00
parent b3a01b5a9d
commit df986ae99c
3 changed files with 15 additions and 9 deletions

View File

@ -209,7 +209,9 @@ namespace pv
{
assert(!_is_saving);
assert(!_is_working);
assert(_callback);
assert(_callback);
set_operation_mode(OPT_SINGLE);
_callback->trigger_message(DSV_MSG_CURRENT_DEVICE_CHANGE_PREV);
@ -241,10 +243,12 @@ namespace pv
_capture_data->_cur_snap_samplerate = _device_agent.get_sample_rate();
_capture_data->_cur_samplelimits = _device_agent.get_sample_limit();
/*
if (_device_agent.get_work_mode() == DSO)
_opt_mode = OPT_REPEAT;
else
_opt_mode = OPT_SINGLE;
*/
// The current device changed.
_callback->trigger_message(DSV_MSG_CURRENT_DEVICE_CHANGED);
@ -488,7 +492,10 @@ namespace pv
if (_device_agent.get_config_value_int16(SR_CONF_OPERATION_MODE, mode_val)){
_is_stream_mode = mode_val == LO_OP_STREAM;
}
}
}
else if (instant && mode == LOGIC && _device_agent.is_demo()){
_is_stream_mode = true;
}
update_view();
@ -1554,7 +1561,7 @@ namespace pv
int SigSession::get_repeat_hold()
{
if (!_is_instant && _is_working && is_repeat_mode())
if (_is_working && is_repeat_mode())
return _repeat_hold_prg;
else
return 0;

View File

@ -801,8 +801,6 @@ namespace pv
{
bool test = false;
dsv_info("Commit device settings.");
if (_device_agent->have_instance())
{
GVariant *gvar = _device_agent->get_config(NULL, NULL, SR_CONF_TEST);

View File

@ -170,9 +170,10 @@ void Viewport::doPaint()
break;
}
if (_view.session().get_device()->get_work_mode() == LOGIC ||
_view.session().is_instant())
{
int mode = _view.session().get_device()->get_work_mode();
if (mode == LOGIC || _view.session().is_instant())
{
if (_view.session().is_init_status())
{
paintCursors(p);
@ -1349,7 +1350,7 @@ void Viewport::set_receive_len(quint64 length)
}
// Received new data, and refresh the view.
update();
repaint();
}
void Viewport::clear_measure()