From 015ada9c062e1bd3e5c1791c14f5c894fabda00a Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 26 Dec 2011 15:13:08 +0100 Subject: Back to nominal units for battery power Must have been a glitch in my kernel version (?) --- src/Plugins/Monitors/Batt.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs index 4445e7a..69ce136 100644 --- a/src/Plugins/Monitors/Batt.hs +++ b/src/Plugins/Monitors/Batt.hs @@ -123,9 +123,9 @@ readBattery files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files - return $ Battery (3600 * a / 1e5) -- wattseconds - (3600 * b / 1e5) -- wattseconds - (d / 1e5) -- watts + return $ Battery (3600 * a / 1e6) -- wattseconds + (3600 * b / 1e6) -- wattseconds + (d / 1e6) -- watts where grab f = handle onError $ withFile f ReadMode (fmap read . hGetLine) onError = const (return (-1)) :: SomeException -> IO Float -- cgit v1.2.3