static uint64_t limit_samples = 0;
static uint64_t limit_frames = 0;
-extern gchar *opt_output_file;
-extern gchar *opt_output_format;
-extern gchar *opt_pds;
-extern gboolean opt_wait_trigger;
-extern gchar *opt_time;
-extern gchar *opt_samples;
-extern gchar *opt_frames;
-extern gchar *opt_continuous;
-extern gchar *opt_config;
-extern gchar *opt_triggers;
#ifdef HAVE_SRD
extern struct srd_session *srd_sess;
#endif
GVariant *gvar;
struct sr_dev_inst *sdi;
uint64_t min_samples, max_samples;
- int max_channels, i;
- char **triggerlist;
devices = device_scan();
if (!devices) {
}
if (opt_triggers) {
- if (!(triggerlist = sr_parse_triggerstring(sdi, opt_triggers))) {
+ if (!parse_triggerstring(sdi, opt_triggers)) {
sr_session_destroy();
return;
}
- max_channels = g_slist_length(sdi->channels);
- for (i = 0; i < max_channels; i++) {
- if (triggerlist[i]) {
- sr_dev_trigger_set(sdi, i, triggerlist[i]);
- g_free(triggerlist[i]);
- }
- }
- g_free(triggerlist);
}
if (opt_continuous) {