hardbyte / hardbyte/python-can

Vector bus receiving buffered messages

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

Description

Hi! I'm building a tool to record CAN signals.

I've found that, once the system is booted, the first recording is allright but the following ones capture about one second of messages that corresponds to the end of the previous recording and then jump to the correct messages (it can be seen in both the CAN timestamps and the sensor's own timestamps).

After many tests, I've found that instantiating twice the bus solves this problem, but only if I let some time between those instantiations (it works both putting some code between them or just calling time.sleep(0.1)).

The instruction I use to instantiate the bus is the following:
```
bus = pycan.interface.Bus(
bustype="vector",
channel=1,
bitrate=5000,
receive_own_messages=False,
app_name="Recorder",
)
```
As it is a really difficult issue to replicate and I'm new to this library I don't know what else data I can add. I've profiled the execution but didn't found anything. Please let me know if I should add anything.

Thanks all!

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.