Skip to content

Commit

Permalink
XMDS: fix negative adjustment and cater for 1 minute collection
Browse files Browse the repository at this point in the history
  • Loading branch information
dasgarner committed Oct 14, 2024
1 parent 48037eb commit 67e1b38
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/Xmds/Soap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3215,7 +3215,12 @@ private function createDisplayAlert(\DomElement $alertNode)
*/
protected function collectionIntervalWithOffset(int $collectionInterval): int
{
$offset = $this->display->displayId % 20;
return $collectionInterval + ($offset < 10 ? ($offset * -1) : $offset);
if ($collectionInterval <= 60) {
$offset = $this->display->displayId % 10;
return $collectionInterval + ($offset < 5 ? (($offset * -1) - 5) : $offset);
} else {
$offset = $this->display->displayId % 20;
return $collectionInterval + ($offset < 10 ? (($offset * -1) -10) : $offset);
}
}
}

0 comments on commit 67e1b38

Please sign in to comment.