Skip to content

Commit e24f6db

Browse files
authored
Merge pull request #480 from open-ephys/issue-479
Account for two tick delay in sample counter on DigitalIO device
2 parents a92062a + 58a018f commit e24f6db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OpenEphys.Onix1/ConfigureDigitalIO.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public override IObservable<ContextTask> Process(IObservable<ContextTask> source
116116

117117
if (sr is not null)
118118
{
119-
var periodTicks = (uint)(baseFreqHz / sr);
119+
var periodTicks = (uint)(baseFreqHz / sr) - 2; // NB: -2 results from known issue in version 2 of DigitalIO device
120120
device.WriteRegister(DigitalIO.SAMPLE_PERIOD, periodTicks);
121121
} else
122122
{

0 commit comments

Comments
 (0)