lockin: add documentation explaining timestamp decrement
This commit is contained in:
parent
3c4e83bf0f
commit
da4430e912
@ -180,8 +180,12 @@ impl Lockin {
|
||||
// update old timestamps for new ADC batch
|
||||
let sample_period = self.sample_period as i32;
|
||||
self.timestamps.iter_mut().for_each(|t| match *t {
|
||||
Some(i) => {
|
||||
*t = Some(i - ADC_SAMPLE_BUFFER_SIZE as i32 * sample_period);
|
||||
Some(timestamp) => {
|
||||
// Existing timestamps have aged by one ADC batch
|
||||
// period since the last ADC batch.
|
||||
*t = Some(
|
||||
timestamp - ADC_SAMPLE_BUFFER_SIZE as i32 * sample_period,
|
||||
);
|
||||
}
|
||||
None => (),
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user