chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some more debug
[chiark-utils.git]
/
cprogs
/
xacpi-simple.c
diff --git
a/cprogs/xacpi-simple.c
b/cprogs/xacpi-simple.c
index 48c2ff4c37ad2423d19c792dab86d4cc8b69cf17..52e02a2e269e2829c4d8c5dc0cb221f98df019b7 100644
(file)
--- a/
cprogs/xacpi-simple.c
+++ b/
cprogs/xacpi-simple.c
@@
-364,6
+364,8
@@
static void acquiredata(void) {
charging_mask= 0;
alarmed = 0;
charging_mask= 0;
alarmed = 0;
+ if (debug) printf("\n");
+
#define Q_ZERO(f,t,...) \
total_##f= 0;
ALL_ACCUMULATE_FIELDS(Q_ZERO)
#define Q_ZERO(f,t,...) \
total_##f= 0;
ALL_ACCUMULATE_FIELDS(Q_ZERO)
@@
-427,7
+429,9
@@
ALL_PLAIN_ACCUMULATE_FIELDS(Q_ACCUMULATE_PLAIN)
}
closedir(di);
}
closedir(di);
- printf("TOTAL:\n");
+ if (debug) {
+ printf("TOTAL:\n");
+ printf(" %-30s = %#20x\n", "mask", charging_mask);
#define T_PRINT(f,...) \
printf(" %-30s = %20.6f\n", #f, total_##f);
BAT_QTYS(T_PRINT,,,)
#define T_PRINT(f,...) \
printf(" %-30s = %20.6f\n", #f, total_##f);
BAT_QTYS(T_PRINT,,,)