[gnome-battery-bench] Show more precision for displays of power



commit 71e9f1a60eb84a5715aae79c1e4bb3dffa1b4ffc
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Jan 19 11:52:38 2015 -0500

    Show more precision for displays of power
    
    Showing only one digit when displaying average power makes it hard
    to see some significant differences - the effect of a settings change
    might be 100mW or less.

 src/application.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/application.c b/src/application.c
index 160bcac..8e3dc27 100644
--- a/src/application.c
+++ b/src/application.c
@@ -179,12 +179,12 @@ update_labels(GbbApplication *application)
     }
 
     if (overall_statistics && overall_statistics->power >= 0)
-        set_label(application, "power-average", "%.1fW", overall_statistics->power);
+        set_label(application, "power-average", "%.2fW", overall_statistics->power);
     else
         clear_label(application, "power-average");
 
     if (interval_statistics && interval_statistics->power >= 0) {
-        set_label(application, "power-instant", "%.1fW", interval_statistics->power);
+        set_label(application, "power-instant", "%.2fW", interval_statistics->power);
     } else {
         clear_label(application, "power-instant");
     }
@@ -614,12 +614,12 @@ fill_log_from_run(GbbApplication *application,
     if (last_state != start_state) {
         GbbPowerStatistics *statistics = gbb_power_statistics_compute(start_state, last_state);
         if (statistics->power >= 0)
-            set_label(application, "power-average-log", "%.1fW", statistics->power);
+            set_label(application, "power-average-log", "%.2fW", statistics->power);
         else
             clear_label(application, "power-average-log");
 
         if (last_state->energy_full >= 0)
-            set_label(application, "energy-full-log", "%.1fWH", last_state->energy_full);
+            set_label(application, "energy-full-log", "%.2fW", last_state->energy_full);
         else
             clear_label(application, "energy-full-log");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]