376: pll: add advance() r=jordens a=jordens



Co-authored-by: Robert Jördens <rj@quartiq.de>
This commit is contained in:
bors[bot] 2021-06-03 15:41:59 +00:00 committed by GitHub
commit 21776d1845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,13 @@ impl PLL {
self.y = self.y.wrapping_add(f);
(self.y, f)
}
/// Advance the PLL without providing a new timestamp.
pub fn advance(&mut self) -> (i32, i32) {
self.x = self.x.wrapping_add(self.f);
self.y = self.y.wrapping_add(self.f);
(self.y, self.f)
}
}
#[cfg(test)]