values are now being rounded
This commit is contained in:
parent
8464808bc8
commit
01bb8fc51b
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ if (isset($_GET['locId'])) {
|
|||
$takenValuesForNextSum += 1;
|
||||
}
|
||||
if ($takenValuesForNextSum === $countOfValuesForAvarage || $i === count($rawMeasvalsOfThisSensor) - 1) {
|
||||
array_push($finalMeasvalsOfThisSensor, array("measvalue" => $tmpMeasvalueSum / $takenValuesForNextSum, "timestamp" => $tmpTimestampSum / $takenValuesForNextSum, "sensorid" => $sensor["id"]));
|
||||
array_push($finalMeasvalsOfThisSensor, array("measvalue" => round($tmpMeasvalueSum / $takenValuesForNextSum, 2), "timestamp" => round($tmpTimestampSum / $takenValuesForNextSum, 0), "sensorid" => $sensor["id"]));
|
||||
|
||||
$takenValuesForNextSum = 0;
|
||||
$tmpMeasvalueSum = 0;
|
||||
|
|
Loading…
Reference in a new issue