X-Git-Url: http://git.itanic.dy.fi/?p=log-plotter;a=blobdiff_plain;f=data.h;h=0906e4cae24a3f40460837c9f4d5d869968bb877;hp=90934a1b203b839ff0de0a157fff16401a905cb5;hb=HEAD;hpb=9abf935040bd368c4b3c1828a79691d200fd45a9 diff --git a/data.h b/data.h index 90934a1..0906e4c 100644 --- a/data.h +++ b/data.h @@ -1,15 +1,18 @@ #ifndef _DATA_H_ #define _DATA_H_ +#include "config.h" + #define MAX_CELLS 10 struct charger_data { - int channel; + unsigned int channel; int state; double timestamp; /* seconds since beginning of the charging */ double input_voltage; double charging_voltage; double charging_current; + int cell_count; double cell_voltage[MAX_CELLS]; double total_charge; /* mAh */ @@ -17,6 +20,6 @@ struct charger_data { double ext_temp; }; -int init_data_parser(int infd, int outfd); +int init_data_parser(int infd, struct plotter_config *cfg); #endif