MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / action_instant_stop

Method action_instant_stop

DSView/pv/toolbars/samplingbar.cpp:904–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

902 }
903
904 bool SamplingBar::action_instant_stop()
905 {
906 if (_session->is_doing_action()){
907 dsv_info("Task is busy.");
908 return false;
909 }
910
911 if (_session->is_working()){
912 return _session->stop_capture();
913 }
914
915 if (_device_agent->have_instance() == false)
916 {
917 dsv_info("Error! Have no device, can't to collect data.");
918 return false;
919 }
920
921 commit_settings();
922
923 if (_device_agent->get_work_mode() == DSO)
924 {
925 bool zero;
926
927 bool ret = _device_agent->get_config_bool(SR_CONF_ZERO, zero);
928 if (ret && zero)
929 {
930 QString strMsg(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_AUTO_CALIB_START), "Auto Calibration program will be started. Don't connect any probes. \nIt can take a while!"));
931
932 if (MsgBox::Confirm(strMsg))
933 {
934 zero_adj();
935 }
936 else
937 {
938 _device_agent->set_config_bool(SR_CONF_ZERO, false);
939 update_view_status();
940 }
941 return false;
942 }
943 }
944
945 if (_device_agent->get_work_mode() == LOGIC && _session->is_realtime_refresh()){
946 if (_view != NULL)
947 _view->auto_set_max_scale();
948 }
949
950 _is_run_as_instant = true;
951 bool ret = _session->start_capture(true);
952
953 return ret;
954 }
955
956 void SamplingBar::on_device_selected()
957 {

Callers

nothing calls this directly

Calls 10

is_doing_actionMethod · 0.80
is_workingMethod · 0.80
stop_captureMethod · 0.80
have_instanceMethod · 0.80
get_work_modeMethod · 0.80
get_config_boolMethod · 0.80
set_config_boolMethod · 0.80
is_realtime_refreshMethod · 0.80
auto_set_max_scaleMethod · 0.80
start_captureMethod · 0.80

Tested by

no test coverage detected