]> git.zerfleddert.de Git - rigol/commitdiff
math/fft added to scope status
authorMichael Gernoth <michael@gernoth.net>
Sat, 19 Jun 2010 16:36:02 +0000 (18:36 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sat, 19 Jun 2010 16:36:02 +0000 (18:36 +0200)
rigold.c
scope.c
scope.h

index d8e4b19486526a4d7bdff680fdebef88ba020d9a..93a5eb05a78c3c71d1d82fb4720cd616ee08be55 100644 (file)
--- 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);
 
                sc->status.timebase.scale,
                sc->status.timebase.format);
 
+       send_text(s, "<br>Math: Math Displayed: %d, FFT Displayed: %d<br>\n",
+               sc->status.math.displayed,
+               sc->status.fft.displayed);
 
        send_text(s, "<br>\n");
        send_text(s, "<form method=\"get\" action=\"\">\n");
 
        send_text(s, "<br>\n");
        send_text(s, "<form method=\"get\" action=\"\">\n");
diff --git a/scope.c b/scope.c
index 9b75ba4ef654564d762f1221857dc1c7f9822cd7..ef14e7285acd51b7658975bb754c3e72ab60f2ca 100644 (file)
--- 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.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;
 }
        return 0;
 }
diff --git a/scope.h b/scope.h
index 453aaf6c99f35549e34aeba582f936dd80c6ef9d..dba5670f3e614bb96baa17159e257c386153b4ea 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -109,9 +109,14 @@ struct scope {
                } la;
 
                struct {
                } la;
 
                struct {
-                       /* TODO */
+                       int displayed;
                } math;
                } math;
+
+               struct {
+                       int displayed;
+               } fft;
        } status;
        } status;
+
        char idn[128];
 };
 
        char idn[128];
 };
 
Impressum, Datenschutz