Skip to content
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

osmotrx, timestamps, and non-monotonic #26

Closed
guruofquality opened this issue Feb 15, 2016 · 3 comments
Closed

osmotrx, timestamps, and non-monotonic #26

guruofquality opened this issue Feb 15, 2016 · 3 comments
Assignees

Comments

@guruofquality
Copy link
Member

Because of the re-calibrations, the streaming is disabled and enabled. This may be causing the timestamp to reset to 0. One possible fix would be to copy the last timestamp into the timestamp offset. This will make the timestamps appear monotonic from the API perspective:

Example, although this did not immediately work (caused application to exit):

diff --git a/src/ConnectionSTREAM/ConnectionSTREAMing.cpp b/src/ConnectionSTREAM/ConnectionSTREAMing.cpp
index f9a9ae1..826eabd 100644
--- a/src/ConnectionSTREAM/ConnectionSTREAMing.cpp
+++ b/src/ConnectionSTREAM/ConnectionSTREAMing.cpp
@@ -158,6 +158,10 @@ struct USBStreamService : StreamerLTE
         //clear any residual data from FIFO
         ResetUSBFIFO(dynamic_cast<LMS64CProtocol *>(mDataPort));

+        //hardware time resets to zero, correct with offset + 100 ms
+        mTimestampOffset += mLastRxTimestamp + mHwCounterRate*0.1;
+        mLastRxTimestamp = 0;
+
         //switch on Rx
         auto regVal = Reg_read(mDataPort, 0x0005);
         int syncDis = txTimeEnabled?0:(1 << 5);

@rjonaitis
Copy link
Member

Added updated SoDeRa firmware 71737b3, now it does not reset timestamp when enabling/disabling stream. Timestamp can be reset to 0 manually.

@9600
Copy link
Member

9600 commented Mar 4, 2016

@guruofquality is this now fixed?

@guruofquality guruofquality self-assigned this Mar 9, 2016
@guruofquality
Copy link
Member Author

I think we got this. I didnt see the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants