Convert data reading into event based system As of preparing for the future, convert the data reading into an even based system. The main loop has got the loop that holds the state of the logging process. All other modules then register itself into the event system where they get called back whenever data gets feed in into their file descriptors. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Add primitive config file parsing support This supports parsing "variable = value" style lines from a config file. The file can also have blank lines and comments starting with '#' character. Anything it doesn't understand are skipped. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Rename debug.[ch] to trace.[ch] This file is more about tracing than debugging, Rename it to match more what it really is about. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
refactor data handling into data.c Let's keep main.c clean and make new file for data handling. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
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>
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>
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>