From: copycat-killer Date: Tue, 16 Aug 2016 10:31:50 +0000 (+0200) Subject: #222 #223: readd math.min to catch #158 X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/0fd21874718daa76f4ffa0c3175397e04d2189b3 #222 #223: readd math.min to catch #158 --- diff --git a/widgets/bat.lua b/widgets/bat.lua index 00d7183..43bb57f 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -131,7 +131,7 @@ local function worker(args) local hours = math.floor(rate_time) local minutes = math.floor((rate_time - hours) * 60) - bat_now.perc = math.floor((sum_energy_now / sum_energy_full) * 100) + bat_now.perc = math.floor(math.min(100, (sum_energy_now / sum_energy_full) * 100)) bat_now.time = string.format("%02d:%02d", hours, minutes) bat_now.watt = tonumber(string.format("%.2f", sum_rate_energy / 1e6)) elseif bat_now.status == "Full" then diff --git a/wiki b/wiki index 8d62fdf..427a9d6 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 8d62fdf794fe0d26802a7d0f7cf156e6b5b620f1 +Subproject commit 427a9d6acbf3b67ce7d61bb2313ff7a983a658b3