unsigned int num_channels, i;
uint64_t samplerate = 0, sr;
char *samplerate_s;
unsigned int num_channels, i;
uint64_t samplerate = 0, sr;
char *samplerate_s;
g_string_append_printf(header, "%s Channels (%d/%d):",
ctx->comment, ctx->num_analog_channels +
ctx->num_logic_channels, num_channels);
g_string_append_printf(header, "%s Channels (%d/%d):",
ctx->comment, ctx->num_analog_channels +
ctx->num_logic_channels, num_channels);
ch = l->data;
if (ch->enabled)
g_string_append_printf(header, " %s,", ch->name);
}
ch = l->data;
if (ch->enabled)
g_string_append_printf(header, " %s,", ch->name);
}
/* Drop last separator. */
g_string_truncate(header, header->len - 1);
/* Drop last separator. */
g_string_truncate(header, header->len - 1);
g_string_append_printf(header, "\n");
if (samplerate != 0) {
samplerate_s = sr_samplerate_string(samplerate);
g_string_append_printf(header, "\n");
if (samplerate != 0) {
samplerate_s = sr_samplerate_string(samplerate);
for (j = ch = 0; ch < ctx->num_logic_channels; j++) {
if (ctx->channels[j].ch->type == SR_CHANNEL_LOGIC) {
for (j = ch = 0; ch < ctx->num_logic_channels; j++) {
if (ctx->channels[j].ch->type == SR_CHANNEL_LOGIC) {
- for (i = 0; i <= logic->length - logic->unitsize; i += logic->unitsize) {
- sample = logic->data + i;
- idx = ctx->channels[ch].ch->index;
+ for (i = 0; i < num_samples; i++) {
+ sample = logic->data + i * logic->unitsize;
+ idx = ctx->channels[j].ch->index;
g_free((gpointer)ctx->frame);
g_free((gpointer)ctx->comment);
g_free((gpointer)ctx->gnuplot);
g_free((gpointer)ctx->frame);
g_free((gpointer)ctx->comment);
g_free((gpointer)ctx->gnuplot);
{"scale", "scale", "Scale gnuplot graphs", NULL, NULL},
{"value", "Value separator", "Character to print between values", NULL, NULL},
{"record", "Record separator", "String to print between records", NULL, NULL},
{"scale", "scale", "Scale gnuplot graphs", NULL, NULL},
{"value", "Value separator", "Character to print between values", NULL, NULL},
{"record", "Record separator", "String to print between records", NULL, NULL},
- {"frame", "Frame seperator", "String to print between frames", NULL, NULL},
+ {"frame", "Frame separator", "String to print between frames", NULL, NULL},
{"comment", "Comment start string", "String used at start of comment lines", NULL, NULL},
{"header", "Output header", "Output header comment with capture metdata", NULL, NULL},
{"label", "Label values", "Type of column labels", NULL, NULL},
{"comment", "Comment start string", "String used at start of comment lines", NULL, NULL},
{"header", "Output header", "Output header comment with capture metdata", NULL, NULL},
{"label", "Label values", "Type of column labels", NULL, NULL},