#include <string.h>
#include <glib.h>
#include "config.h"
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
struct context {
unsigned int num_enabled_probes;
if (!o)
return SR_ERR_ARG;
- if (!o->dev)
+ if (!o->sdi)
return SR_ERR_ARG;
- if (!o->dev->driver)
+ if (!o->sdi->driver)
return SR_ERR_ARG;
if (!(ctx = g_try_malloc0(sizeof(struct context))))
/* Get the number of probes and their names. */
ctx->probelist = g_ptr_array_new();
- for (l = o->dev->probes; l; l = l->next) {
+ for (l = o->sdi->probes; l; l = l->next) {
probe = l->data;
if (!probe || !probe->enabled)
continue;
max = length_in / sizeof(float);
for (i = 0; i < max;) {
for (j = 0; j < ctx->num_enabled_probes; j++) {
- g_string_append_printf(outstr, "%s: %f\n",
+ g_string_append_printf(outstr, "%s: %.12f\n",
(char *)g_ptr_array_index(ctx->probelist, j),
fdata[i++]);
}