code cleanup
This commit is contained in:
parent
a61b0e6a35
commit
78ed642035
|
@ -112,8 +112,8 @@ static int init(struct output *o, int default_spl)
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(ctx->header, 511, "%s\n", PACKAGE_STRING);
|
snprintf(ctx->header, 511, "%s\n", PACKAGE_STRING);
|
||||||
if (o->device->plugin) {
|
|
||||||
num_probes = g_slist_length(o->device->probes);
|
num_probes = g_slist_length(o->device->probes);
|
||||||
|
if (o->device->plugin) {
|
||||||
samplerate = *((uint64_t *) o->device->plugin->get_device_info(
|
samplerate = *((uint64_t *) o->device->plugin->get_device_info(
|
||||||
o->device->plugin_index, DI_CUR_SAMPLERATE));
|
o->device->plugin_index, DI_CUR_SAMPLERATE));
|
||||||
if (!(samplerate_s = sigrok_samplerate_string(samplerate))) {
|
if (!(samplerate_s = sigrok_samplerate_string(samplerate))) {
|
||||||
|
@ -154,6 +154,8 @@ static int event(struct output *o, int event_type, char **data_out,
|
||||||
switch (event_type) {
|
switch (event_type) {
|
||||||
case DF_TRIGGER:
|
case DF_TRIGGER:
|
||||||
ctx->mark_trigger = ctx->spl_cnt;
|
ctx->mark_trigger = ctx->spl_cnt;
|
||||||
|
*data_out = NULL;
|
||||||
|
*length_out = 0;
|
||||||
break;
|
break;
|
||||||
case DF_END:
|
case DF_END:
|
||||||
outsize = ctx->num_enabled_probes
|
outsize = ctx->num_enabled_probes
|
||||||
|
@ -166,6 +168,10 @@ static int event(struct output *o, int event_type, char **data_out,
|
||||||
free(o->internal);
|
free(o->internal);
|
||||||
o->internal = NULL;
|
o->internal = NULL;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
*data_out = NULL;
|
||||||
|
*length_out = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SIGROK_OK;
|
return SIGROK_OK;
|
||||||
|
|
Loading…
Reference in New Issue