]> git.itanic.dy.fi Git - log-plotter/log
log-plotter
10 years agoAdd more advanced debug macro
Timo Kokkonen [Sun, 6 Oct 2013 14:57:09 +0000 (17:57 +0300)]
Add more advanced debug macro

Make it possible to have multiple debug levels. This makes it possible
to remove unneeded (debug) output when user is not interested in
seeing the output.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
10 years agoAdd command line parsing
Timo Kokkonen [Sun, 6 Oct 2013 13:46:58 +0000 (16:46 +0300)]
Add command line parsing

Add generic commnd line parsing code for adjusting the run time
configurable parameters.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
10 years agobaud: Add missing newline to error print
Timo Kokkonen [Sun, 6 Oct 2013 13:42:07 +0000 (16:42 +0300)]
baud: Add missing newline to error print

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
10 years agoAdd draw_plots.sh
Timo Kokkonen [Sat, 5 Oct 2013 19:20:33 +0000 (22:20 +0300)]
Add draw_plots.sh

This simple helper script draws all plots for a given logfile. The
.plot files are adjusted to not use a fixed file name, but instead
rely on the calling script to set the file into "datafile" variable.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
10 years agomain: Add missing EOF check to serial read
Timo Kokkonen [Fri, 4 Oct 2013 19:52:33 +0000 (22:52 +0300)]
main: Add missing EOF check to serial read

If we got EOF from the serial port, close it and exit. Nothing more to
do.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
10 years agomain: Fix busy loop with reading
Timo Kokkonen [Mon, 30 Sep 2013 18:09:07 +0000 (21:09 +0300)]
main: Fix busy loop with reading

As the baud.c opens the serial device with O_NBLOCK flag, read will
just return immediately when there is nothing to read. That basically
makes the read loop a a busy loop, consuming one CPU core fully at all
times.

Fix the problem by using epoll to wait until something becomes
available on the serial port to read.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
10 years agoAdd couple of example gnuplot files for plotting graphs
Timo Kokkonen [Sun, 29 Sep 2013 19:30:52 +0000 (22:30 +0300)]
Add couple of example gnuplot files for plotting graphs

voltage_and_current.plot: This one plots somewhat typical charging
graphs with voltage, current and accumulated charge visible.

balancing.plot: This one plots a graph of the balancing action. Cell
voltages compared to the average cell voltages (over average of five
samples) is plotted.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
10 years agoInitial commit
Timo Kokkonen [Sun, 29 Sep 2013 19:05:52 +0000 (22:05 +0300)]
Initial commit

Add a very very simple version of the "plotter". It does no plotting,
it only opens the serial device with correct baud rate, reads out the
data at correct baud rate (correct for an iCharger 206B charer) and
prints out exactly what it read. Dumb as hell but works.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>