Added rate check
This commit is contained in:
parent
7a4c3345fb
commit
37c4198cdf
1 changed files with 7 additions and 0 deletions
|
@ -69,6 +69,13 @@ local function worker(args)
|
||||||
local rate_voltage = tonumber(first_line(bstr .. "/voltage_now"))
|
local rate_voltage = tonumber(first_line(bstr .. "/voltage_now"))
|
||||||
local rate_power = tonumber(first_line(bstr .. "/power_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]
|
-- energy_now(P)[uWh], charge_now(I)[uAh]
|
||||||
local energy_now = tonumber(first_line(bstr .. "/energy_now") or
|
local energy_now = tonumber(first_line(bstr .. "/energy_now") or
|
||||||
first_line(bstr .. "/charge_now"))
|
first_line(bstr .. "/charge_now"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue