]> sigrok.org Git - libsigrok.git/blobdiff - output/gnuplot.c
Rename 'struct sr_probe' to 'struct sr_channel' everywhere.
[libsigrok.git] / output / gnuplot.c
index 27a764c8ad209da04b816cc94772543b5f833fd2..8976263a37d179a253d837a6fe0466e54fb1e83b 100644 (file)
@@ -51,7 +51,7 @@ static const char *gnuplot_header_comment = "\
 static int init(struct sr_output *o)
 {
        struct context *ctx;
-       struct sr_probe *probe;
+       struct sr_channel *probe;
        GSList *l;
        GVariant *gvar;
        uint64_t samplerate;
@@ -86,6 +86,11 @@ static int init(struct sr_output *o)
                        continue;
                ctx->num_enabled_probes++;
        }
+       if (ctx->num_enabled_probes <= 0) {
+               sr_err("%s: no logic probe enabled", __func__);
+               return SR_ERR;
+       }
+
        ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
 
        num_probes = g_slist_length(o->sdi->probes);