MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / check_trig_channel

Method check_trig_channel

DSView/pv/dock/dsotriggerdock.cpp:309–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309bool DsoTriggerDock::check_trig_channel()
310{
311 int id = _source_group->checkedId();
312 bool b0 = _session->get_device()->channel_is_enable(0);
313 bool b1 = _session->get_device()->channel_is_enable(1);
314
315 if (DSO_TRIGGER_CH0 == id && !b0){
316 dsv_err("ERROR: The trigger channel is disabled");
317 return false;
318 }
319 else if (DSO_TRIGGER_CH1 == id && !b1){
320 dsv_err("ERROR: The trigger channel is disabled");
321 return false;
322 }
323 else if (DSO_TRIGGER_CH0A1 == id && (!b0 || !b1)){
324 dsv_err("ERROR: The trigger channel is disabled");
325 return false;
326 }
327
328 return true;
329}
330
331void DsoTriggerDock::channel_changed(int ch)
332{

Callers

nothing calls this directly

Calls 2

channel_is_enableMethod · 0.80
get_deviceMethod · 0.80

Tested by

no test coverage detected