aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg2016-01-25 00:53:59 -0800
committerMichael Stapelberg2016-01-25 00:53:59 -0800
commit85329802b29406925bf1f1656de85daf892309f3 (patch)
tree6ce41dd66aa0f10dd9784a0cd8f60f9a8de4226c
parentMerge pull request #100 from czarkoff/mail-python (diff)
parentThis removes the 'remaining' time when the battery is full, since the remaini... (diff)
Merge pull request #103 from craftyguy/bat_full_remaining
This removes the 'remaining' time when the battery is full, since theā€¦
-rw-r--r--src/print_battery_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_battery_info.c b/src/print_battery_info.c
index 90db4bb..9ce121e 100644
--- a/src/print_battery_info.c
+++ b/src/print_battery_info.c
@@ -152,7 +152,7 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char
(void)snprintf(percentagebuf, sizeof(percentagebuf), "%.02f%s", percentage_remaining, pct_mark);
}
- if (present_rate > 0) {
+ if (present_rate > 0 && status != CS_FULL) {
float remaining_time;
int seconds, hours, minutes, seconds_remaining;
if (status == CS_CHARGING)