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

@@ -1534,3 +1534,7 @@ function create_sensor_to_state_index($device, $state_name, $index)
dbInsert($insert, 'sensors_to_state_indexes');
}
}
function delta_to_bits($delta,$period) {
return round(($_delta * 8 / $period), 2);
}