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 f8e1977 commit cf47cdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Xmds/Soap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3217,10 +3217,10 @@ protected function collectionIntervalWithOffset(int $collectionInterval): int
{
if ($collectionInterval <= 60) {
$offset = $this->display->displayId % 10;
return $collectionInterval + ($offset < 5 ? $offset * -1 : $offset - 5);
return $collectionInterval + ($offset <= 5 ? $offset * -1 : $offset - 5);
} else {
$offset = $this->display->displayId % 20;
return $collectionInterval + ($offset < 10 ? $offset * -1 : $offset - 10);
return $collectionInterval + ($offset <= 10 ? $offset * -1 : $offset - 10);
}
}
}

0 comments on commit cf47cdf

Please sign in to comment.