projects
/
sysstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
624dbb2
)
battery: Add divider for voltage_now
master
author
norly
<ny-git@enpas.org>
Fri, 4 Feb 2022 15:23:27 +0000
(16:23 +0100)
committer
norly
<ny-git@enpas.org>
Fri, 4 Feb 2022 15:23:27 +0000
(16:23 +0100)
Yes, the millions of Watts displayed were in error.
src/status/battery.c
patch
|
blob
|
history
diff --git
a/src/status/battery.c
b/src/status/battery.c
index 5ce9b04dbfb78bbbe31d32dcb4bc415bceb55f65..79d65da49e13cbd631c24679b1876d502e450068 100644
(file)
--- a/
src/status/battery.c
+++ b/
src/status/battery.c
@@
-112,7
+112,7
@@
void status_battery(GlobalData *g, char *batname)
batname, chargePercent);
} else {
snprintf(text, sizeof(text), "%s: %d%% %.1fh %.1fW",
- batname, chargePercent, battTime, (float)voltageNow * (float)currentNow / 1000000.0);
+ batname, chargePercent, battTime, (float)voltageNow
/ 1000000.0
* (float)currentNow / 1000000.0);
}
line_append_item(g, &s);