commit
0cfb9187ef
2 changed files with 4 additions and 4 deletions
|
@ -131,7 +131,7 @@ local function worker(args)
|
||||||
|
|
||||||
local hours = math.floor(rate_time)
|
local hours = math.floor(rate_time)
|
||||||
local minutes = math.floor((rate_time - hours) * 60)
|
local minutes = math.floor((rate_time - hours) * 60)
|
||||||
bat_now.perc = tonumber(string.format("%d", math.min(100, sum_energy_percentage / #batteries)))
|
bat_now.perc = tonumber(string.format("%d", math.floor(math.min(100, sum_energy_percentage / #batteries))))
|
||||||
bat_now.time = string.format("%02d:%02d", hours, minutes)
|
bat_now.time = string.format("%02d:%02d", hours, minutes)
|
||||||
bat_now.watt = tonumber(string.format("%.2f", sum_rate_energy / 1e6))
|
bat_now.watt = tonumber(string.format("%.2f", sum_rate_energy / 1e6))
|
||||||
elseif bat_now.status == "Full" then
|
elseif bat_now.status == "Full" then
|
||||||
|
|
|
@ -128,12 +128,12 @@ local function worker(args)
|
||||||
net_now.sent = string.gsub(string.format('%.1f', net_now.sent), ',', '.')
|
net_now.sent = string.gsub(string.format('%.1f', net_now.sent), ',', '.')
|
||||||
net_now.received = string.gsub(string.format('%.1f', net_now.received), ',', '.')
|
net_now.received = string.gsub(string.format('%.1f', net_now.received), ',', '.')
|
||||||
|
|
||||||
widget = net.widget
|
|
||||||
settings()
|
|
||||||
|
|
||||||
net.last_t = total_t
|
net.last_t = total_t
|
||||||
net.last_r = total_r
|
net.last_r = total_r
|
||||||
end
|
end
|
||||||
|
|
||||||
|
widget = net.widget
|
||||||
|
settings()
|
||||||
end
|
end
|
||||||
|
|
||||||
helpers.newtimer(iface, timeout, update)
|
helpers.newtimer(iface, timeout, update)
|
||||||
|
|
Loading…
Add table
Reference in a new issue