hardbyte / hardbyte/python-can

can.CanError not being raised

Đang mở
#1,161 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.6k
Fork
697
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.