hardbyte / hardbyte/python-can

Vector bus receiving buffered messages

Offen
#1,594 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
1.6k
Forks
697
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.