]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Removed forgotten previous rate rule.
authorAndrej Kouřil <andering@gmail.com>
Sun, 27 Mar 2016 13:29:38 +0000 (15:29 +0200)
committerAndrej Kouřil <andering@gmail.com>
Sun, 27 Mar 2016 13:29:38 +0000 (15:29 +0200)
widgets/bat.lua

index 9bd526a2bd4148a947161fa1edb2bfdda91496d6..9ab4ce683e91f33c71fbbd13e0123ea3687ec3d0 100644 (file)
@@ -69,13 +69,6 @@ local function worker(args)
                        local rate_voltage      = tonumber(first_line(bstr .. "/voltage_now"))
                        local rate_power        = tonumber(first_line(bstr .. "/power_now"))
 
                        local rate_voltage      = tonumber(first_line(bstr .. "/voltage_now"))
                        local rate_power        = tonumber(first_line(bstr .. "/power_now"))
 
-                       -- if rate = 0 or rate not defined skip the round
-                       if not (rate_power and rate_power > 0) and 
-                               not (rate_current and  rate_current > 0) 
-                       then
-                               return 
-                       end
-
                        -- energy_now(P)[uWh], charge_now(I)[uAh] 
                        local energy_now        = tonumber(first_line(bstr .. "/energy_now") or
                                                                                first_line(bstr .. "/charge_now"))
                        -- energy_now(P)[uWh], charge_now(I)[uAh] 
                        local energy_now        = tonumber(first_line(bstr .. "/energy_now") or
                                                                                first_line(bstr .. "/charge_now"))