hardbyte / hardbyte/python-can
Vector bus receiving buffered messages
- Lenguaje dominante
- Python
- Estrellas
- 1.6k
- Forks
- 697
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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!
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.