]> sigrok.org Git - libsigrok.git/blobdiff - session_file.c
demo: Cycle through all available patterns for default analog probes.
[libsigrok.git] / session_file.c
index 6a28a17bc5143374fbda4ac58f24f0757f784752..545abcfdbd4fcc198bf933aeb2bf113baee54471 100644 (file)
@@ -253,11 +253,14 @@ SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi,
        cnt = 0;
        for (l = sdi->probes; l; l = l->next) {
                probe = l->data;
-               if (probe->enabled) {
-                       if (probe->name)
-                               /* Just borrowing the ptr. */
-                               probe_names[cnt++] = probe->name;
-               }
+               if (probe->type != SR_PROBE_LOGIC)
+                       continue;
+               if (probe->enabled != TRUE)
+                       continue;
+               if (!probe->name)
+                       continue;
+               /* Just borrowing the ptr. */
+               probe_names[cnt++] = probe->name;
        }
 
        if ((ret = sr_session_save_init(filename, samplerate, probe_names)) != SR_OK)