]> git.itanic.dy.fi Git - log-plotter/blobdiff - data.h
Add charging current and total charge into the status field
[log-plotter] / data.h
diff --git a/data.h b/data.h
index fa3b055803fd446adcf949ab640f48a40ffd1440..3034e0c62ad1999081b342dceb206cdd2d862c7d 100644 (file)
--- a/data.h
+++ b/data.h
@@ -1,6 +1,22 @@
 #ifndef _DATA_H_
 #define _DATA_H_
 
+#define MAX_CELLS 10
+
+struct charger_data {
+       int channel;
+       int state;
+       double timestamp;       /* seconds since beginning of the charging */
+       double input_voltage;
+       double charging_voltage;
+       double charging_current;
+       double cell_voltage[MAX_CELLS];
+
+       double total_charge;    /* mAh */
+       double int_temp;        /* milli celsius */
+       double ext_temp;
+};
+
 int read_data(int infd, int outfd);
 
 #endif