forked from Ivasoft/DSView
The time to switch the captured data buffer, and the demo device's collect mode
This commit is contained in:
@@ -1914,13 +1914,15 @@ namespace pv
|
||||
}
|
||||
break;
|
||||
|
||||
case DSV_MSG_BEGIN_DEVICE_OPTIONS:
|
||||
case DSV_MSG_BEGIN_DEVICE_OPTIONS:
|
||||
case DSV_MSG_COLLECT_MODE_CHANGED:
|
||||
if(_device_agent->is_demo()){
|
||||
_pattern_mode = _device_agent->get_demo_operation_mode();
|
||||
}
|
||||
break;
|
||||
|
||||
case DSV_MSG_END_DEVICE_OPTIONS:
|
||||
case DSV_MSG_END_DEVICE_OPTIONS:
|
||||
case DSV_MSG_DEMO_OPERATION_MODE_CHNAGED:
|
||||
if(_device_agent->is_demo() &&_device_agent->get_work_mode() == LOGIC){
|
||||
QString pattern_mode = _device_agent->get_demo_operation_mode();
|
||||
|
||||
@@ -1930,44 +1932,25 @@ namespace pv
|
||||
_device_agent->set_config_bool(SR_CONF_DEMO_INIT, true);
|
||||
|
||||
_device_agent->update();
|
||||
_session->clear_view_data();
|
||||
_session->init_signals();
|
||||
update_toolbar_view_status();
|
||||
_sampling_bar->update_sample_rate_list();
|
||||
_protocol_widget->del_all_protocol();
|
||||
|
||||
if(_pattern_mode != "random")
|
||||
{
|
||||
if(_pattern_mode != "random"){
|
||||
_session->set_operation_mode(OPT_SINGLE);
|
||||
StoreSession ss(_session);
|
||||
QJsonArray deArray = get_decoder_json_from_file(_device_agent->path());
|
||||
ss.load_decoders(_protocol_widget, deArray);
|
||||
_session->start_capture(false);
|
||||
|
||||
if (msg == DSV_MSG_END_DEVICE_OPTIONS)
|
||||
_session->start_capture(false); // Auto load data.
|
||||
}
|
||||
}
|
||||
}
|
||||
calc_min_height();
|
||||
break;
|
||||
|
||||
case DSV_MSG_DEMO_OPERATION_MODE_CHNAGED:
|
||||
if(_device_agent->is_demo() &&_device_agent->get_work_mode() == LOGIC){
|
||||
_session->clear_view_data();
|
||||
|
||||
_device_agent->set_config_bool(SR_CONF_DEMO_INIT, true);
|
||||
_device_agent->update();
|
||||
_session->init_signals();
|
||||
update_toolbar_view_status();
|
||||
_sampling_bar->update_sample_rate_list();
|
||||
_protocol_widget->del_all_protocol();
|
||||
|
||||
QString pattern_mode = _device_agent->get_demo_operation_mode();
|
||||
if(pattern_mode != "random"){
|
||||
_session->set_operation_mode(OPT_SINGLE);
|
||||
StoreSession ss(_session);
|
||||
QJsonArray deArray = get_decoder_json_from_file(_device_agent->path());
|
||||
ss.load_decoders(_protocol_widget, deArray);
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user