Sanity check the in/out_delta value, if it's out of the range of the

ifSpeed then we use the previous value
This commit is contained in:
laf
2016-06-15 16:25:14 +00:00
parent 66f8a7e071
commit e5e1e89331
4 changed files with 20 additions and 7 deletions

View File

@@ -131,8 +131,8 @@ foreach (dbFetch('SELECT *, UNIX_TIMESTAMP(timestamp) AS formatted_date FROM bil
$period = $row['period'];
$in_delta = $row['in_delta'];
$out_delta = $row['out_delta'];
$in_value = round(($in_delta * 8 / $period), 2);
$out_value = round(($out_delta * 8 / $period), 2);
$in_value = delta_to_bits($in_delta, $period);
$out_value = delta_to_bits($out_delta, $period);;
$last = $timestamp;