-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat time correction #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't test yet without sln, but generally looks good.
src/ofxLSLReceiver.h
Outdated
@@ -75,6 +80,7 @@ class Receiver : public BaseReceiver { | |||
sampleBuffer->timeStamp = ts; | |||
if (ts > 0) { | |||
std::lock_guard<std::mutex> lock(pullMutex); | |||
sampleBuffer->timeCorrection = getTimeCorrection(1); // update the time correction value when pulling sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does a timeout return?
Are we able to handle that case reasonably downstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested by making timenot = 0.1s. (getTimeCorrection(0.1)
), and the example threw a lsl::timeout exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the library,
param timeout Timeout to acquire the first time-correction estimate (default: no timeout).
Looks like this timeout is only for the first correction. So it is better to remove the timeout all together, since it only affects the first reading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ merging |
Description