From 811f1259bdfc86f06fb13d7cde80befb4a808063 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 19 Jun 2010 18:36:02 +0200 Subject: [PATCH 1/1] math/fft added to scope status --- rigold.c | 3 +++ scope.c | 3 +++ scope.h | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rigold.c b/rigold.c index d8e4b19..93a5eb0 100644 --- a/rigold.c +++ b/rigold.c @@ -192,6 +192,9 @@ static void serve_index(int s, struct scope *sc, char *param) sc->status.timebase.scale, sc->status.timebase.format); + send_text(s, "
Math: Math Displayed: %d, FFT Displayed: %d
\n", + sc->status.math.displayed, + sc->status.fft.displayed); send_text(s, "
\n"); send_text(s, "
\n"); diff --git a/scope.c b/scope.c index 9b75ba4..ef14e72 100644 --- a/scope.c +++ b/scope.c @@ -268,5 +268,8 @@ int update_scope_status(struct scope *sc) sc->status.timebase.scale = scope_get_double(sc, ":TIM:SCAL?"); COPY_SCOPE_STRING(sc, ":TIM:FORM?", sc->status.timebase.format); + sc->status.math.displayed = scope_get_truth_value(sc, ":MATH:DISP?"); + sc->status.fft.displayed = scope_get_truth_value(sc, ":FFT:DISP?"); + return 0; } diff --git a/scope.h b/scope.h index 453aaf6..dba5670 100644 --- a/scope.h +++ b/scope.h @@ -109,9 +109,14 @@ struct scope { } la; struct { - /* TODO */ + int displayed; } math; + + struct { + int displayed; + } fft; } status; + char idn[128]; }; -- 2.39.5