gnome-power-manager r3215 - in trunk: . src



Author: rhughes
Date: Mon Feb  2 12:36:20 2009
New Revision: 3215
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3215&view=rev

Log:
2009-02-02  Richard Hughes  <richard hughsie com>

* src/gpm-statistics.c: (gpm_stats_data_changed_cb):
Only update the wakeups data when the wakeups tab is open.

* src/gpm-statistics.c: (gpm_stats_update_smooth_data):
Increase the size of the gaussian array to avoid truncating the data.


Modified:
   trunk/ChangeLog
   trunk/src/gpm-statistics.c

Modified: trunk/src/gpm-statistics.c
==============================================================================
--- trunk/src/gpm-statistics.c	(original)
+++ trunk/src/gpm-statistics.c	Mon Feb  2 12:36:20 2009
@@ -254,7 +254,7 @@
 	outliers = egg_array_float_remove_outliers (raw, 3, 0.1);
 
 	/* convolve with gaussian */
-	gaussian = egg_array_float_compute_gaussian (11, sigma_smoothing);
+	gaussian = egg_array_float_compute_gaussian (15, sigma_smoothing);
 	convolved = egg_array_float_convolve (outliers, gaussian);
 
 	/* add the smoothed data back into a new array */
@@ -991,7 +991,8 @@
 static void
 gpm_stats_data_changed_cb (DkpClient *client, gpointer user_data)
 {
-	gpm_stats_update_wakeups_data ();
+	if (egg_strequal (current_device, "wakeups"))
+		gpm_stats_update_wakeups_data ();
 }
 
 /**



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