hardbyte / hardbyte/python-can

Replay candump: `MessageSync` (python-can) and `canplayer` (can-utils) behave slightly differently

Open
#1,646 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
1.6k
Forks
697
PR merge metrics
No merged PRs in 30d

Description

Hi,
### Observation:
Regarding the skip parameter `MessageSync` (python-can) and `canplayer` (can-utils) behave slightly differently.

`canplayer -s 1 -I candump.log`
skip gaps in timestamps > 1 second
if skip gap is detected the subsequent CAN msg is sent *instantly*

however

`MessageSync(reader,timestamps=True, skip=1)`
skip gaps in timestamps > 1 second
if skip gap is detected the subsequent CAN msg is sent only *after 1sec*

As a result there is an additional gap of 1sec if I compare both traces.

### Expected behavior
`canplayer` and `python-can` replay stored canlogs exactly the same

### Additional context
I'm not really sure whether this is a bug or a feature.
However I decided to share my experience as I spent quite some time to find the root cause of my problem.
Many thanks ...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.