]> sigrok.org Git - libsigrok.git/blobdiff - output/ols.c
Replace 'probe' with 'channel' in most places.
[libsigrok.git] / output / ols.c
index 19c4d993163e8c62a2295d1e8e9b3927a35c83b8..b59931624921ba0565e88d76cf82eb3d082d237c 100644 (file)
@@ -56,11 +56,11 @@ static int init(struct sr_output *o)
 
 static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx)
 {
-       struct sr_channel *probe;
+       struct sr_channel *ch;
        GSList *l;
        GString *s;
        GVariant *gvar;
-       int num_enabled_probes;
+       int num_enabled_channels;
 
        if (!ctx->samplerate && sr_config_get(sdi->driver, sdi, NULL,
                        SR_CONF_SAMPLERATE, &gvar) == SR_OK) {
@@ -68,19 +68,19 @@ static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx)
                g_variant_unref(gvar);
        }
 
-       num_enabled_probes = 0;
-       for (l = sdi->probes; l; l = l->next) {
-               probe = l->data;
-               if (probe->type != SR_PROBE_LOGIC)
+       num_enabled_channels = 0;
+       for (l = sdi->channels; l; l = l->next) {
+               ch = l->data;
+               if (ch->type != SR_PROBE_LOGIC)
                        continue;
-               if (!probe->enabled)
+               if (!ch->enabled)
                        continue;
-               num_enabled_probes++;
+               num_enabled_channels++;
        }
 
        s = g_string_sized_new(512);
        g_string_append_printf(s, ";Rate: %"PRIu64"\n", ctx->samplerate);
-       g_string_append_printf(s, ";Channels: %d\n", num_enabled_probes);
+       g_string_append_printf(s, ";Channels: %d\n", num_enabled_channels);
        g_string_append_printf(s, ";EnabledChannels: -1\n");
        g_string_append_printf(s, ";Compressed: true\n");
        g_string_append_printf(s, ";CursorEnabled: false\n");