datalog: add a tip showing gnuplot usage

Add a comment to the datalog output showing how it can be viewed with
gnuplot.  It would be trivial to add this as a .plot script, but it's
even easier in the datalog output.
This commit is contained in:
Phil Hord 2013-11-25 18:23:10 -05:00 committed by Markus Hitter
parent 46bbc09118
commit c7b43782ce
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,11 @@ void recorder_init(const char* filename) {
time_t t = time(NULL);
fprintf(file, "# Teacup_Firmware simulator v1.0\n");
fprintf(file, "# Recorded %s\n", asctime(localtime(&t)));
fprintf(file, "#\n# Tips:\n");
fprintf(file, "# * Plot the actual points traveled with gnuplot\n");
fprintf(file, "# gnuplot --persist -e \"set pointsize 0.01; plot '%s' u 2:3:1 with points\"\n", filename);
fprintf(file, "#\n");
fflush(file);
on_exit(recorder_close, NULL);
}