hardbyte / hardbyte/python-can

can.CanError not being raised

Abierto
#1,161 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
1.6k
Forks
697
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I have an Ixxat USB-to-CAN V2 hooked up to an embedded system.
The system is initially shut down, without any electricity, so there is no way for the CAN to work, because there is only one lonely Ixxat and nothing can send the acknowledgement bit.
When calling network.send_message(canID, data) like this:
```
while tryingToEnterBackdoor:
try:
network.send_message(secretID, backDoorData)
tryingToEnterBackdoor = False
except can.CanError: # this error is currently not working as intended
time.sleep(0.002)
```
The Ixxat then starts flashing the red CAN LED and the console is outputting "CAN acknowledgment error" in red letters. So far this is expected.
However, the function network.send_message does not raise the can.CanError exception and instead we leave the loop instantly.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.