bat: make update() available; #236
This commit is contained in:
parent
98bb2dc5ef
commit
ce12475ede
2 changed files with 3 additions and 3 deletions
|
@ -24,5 +24,5 @@ dependencies = {
|
||||||
supported_platforms = { "linux" }
|
supported_platforms = { "linux" }
|
||||||
build = {
|
build = {
|
||||||
type = "builtin",
|
type = "builtin",
|
||||||
modules = { lain = "init.lua" },
|
modules = { lain = "init.lua" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ local function worker(args)
|
||||||
bat_now.n_perc[i] = 0
|
bat_now.n_perc[i] = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function update()
|
function bat.update()
|
||||||
local sum_rate_current = 0
|
local sum_rate_current = 0
|
||||||
local sum_rate_voltage = 0
|
local sum_rate_voltage = 0
|
||||||
local sum_rate_power = 0
|
local sum_rate_power = 0
|
||||||
|
@ -165,7 +165,7 @@ local function worker(args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
newtimer(battery, timeout, update)
|
newtimer(battery, timeout, bat.update)
|
||||||
|
|
||||||
return setmetatable(bat, { __index = bat.widget })
|
return setmetatable(bat, { __index = bat.widget })
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue