#162 comment 241640965: fix magnitude check when 100% on AC

This commit is contained in:
Luke Bonham 2016-08-24 17:14:06 +02:00
parent 1129e88960
commit 0e37d220b7
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ local function worker(args)
rate_time = sum_energy_now / div
end
if rate_time < 0.01 then -- check for magnitude discrepancies (#199)
if 0 < rate_time and rate_time < 0.01 then -- check for magnitude discrepancies (#199)
rate_time_magnitude = math.abs(math.floor(math.log10(rate_time)))
rate_time = rate_time * 10^(rate_time_magnitude - 2)
end