iowatcher: Fix spindle rotation in the movie mode
authorChris Mason <chris.mason@fusionio.com>
Mon, 14 Jan 2013 21:05:13 +0000 (16:05 -0500)
committerChris Mason <clm@fb.com>
Wed, 24 Sep 2014 19:02:07 +0000 (12:02 -0700)
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
iowatcher/plot.c

index 1e9b7d7345612e999142e4e2e62a4dbae7f0867d..7b4e18c7089f4cc95b5aed4c6770031527ee09bb 100644 (file)
@@ -939,7 +939,7 @@ int svg_io_graph_movie_array_spindle(struct plot *plot, struct pid_plot_history
                 "<circle cx=\"%.2f\" cy=\"%.2f\" "
                 "stroke=\"black\" stroke-width=\"6\" "
                 "r=\"%.2f\" fill=\"none\"/>\n",
-                -spindle_steps * 1.2, center_x, center_y, center_x, center_y, graph_width_extra / 2);
+                spindle_steps * 1.2, center_x, center_y, center_x, center_y, graph_width_extra / 2);
        write(plot->fd, line, strlen(line));
        snprintf(line, line_len, "<circle cx=\"%.2f\" cy=\"%.2f\" "
                "stroke=\"none\" fill=\"red\" r=\"%.2f\"/>\n</g>\n",
@@ -964,7 +964,7 @@ int svg_io_graph_movie_array_spindle(struct plot *plot, struct pid_plot_history
                snprintf(line, line_len, "<path transform=\"rotate(%.4f, %.2f, %.2f)\" "
                         "d=\"M %.2f %.2f a %.2f %.2f 0 0 1 0 5\" "
                         "stroke=\"%s\" stroke-width=\"4\"/>\n",
-                        rot, center_x, center_y,
+                        -rot, center_x, center_y,
                         axis_x_off_double(graph_width_extra / 2 + radius) + 8, center_y,
                         radius, radius, pph->color);