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

kvaser timestamps broken since 4.4.1 #1877

Closed
johanb321 opened this issue Oct 21, 2024 · 2 comments · Fixed by #1878
Closed

kvaser timestamps broken since 4.4.1 #1877

johanb321 opened this issue Oct 21, 2024 · 2 comments · Fixed by #1878
Labels

Comments

@johanb321
Copy link

Describe the bug

Timestamps from kvaser messages are errouneous, due to the timestamp offset applied is incorrectly initialized in init function.
Looks like the root cause is that the calls to canBusOn were moved in version 4.4.1 to now be done after the calls to kvReadTimer used to initialize the timestamp offset, this is causing the kvReadTimer to return a value that is not right (a way much bigger value than what is returned as timestamps on messages received later!).

To Reproduce

Check timestamps on received messages from _recv_internal function and compare them with the value of time.time() when the function returned, it should be close to zero but is not.

Expected behavior

Timestamps should be accurate and in sync with values returned by time.time()

Additional context

OS and version: Windows 10
Python version: 3.11.7
python-can version: 4.4.2
python-can interface/s (if applicable): Kvaser Leaf light v2

Traceback and logs
def func():
    return "hello, world!"
@zariiii9003
Copy link
Collaborator

Thank you for reporting this. Can you confirm, that #1878 solves the issue?

@johanb321
Copy link
Author

Tried it out and it works just fine!

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

Successfully merging a pull request may close this issue.

2 participants