Skip to content

Commit 4b2b3b9

Browse files
committed
Cleanups
1 parent 2adcbb7 commit 4b2b3b9

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[flake8]
22
max-line-length = 120
3+
ignore = S101

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ new_message = canalystii.Message(can_id=0x300,
2929
data=(0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08))
3030
# Send one copy to channel 1
3131
dev.send(1, new_message)
32-
# Send 3 copies to channel 0 (argument can be an instance of canalystii.Message or a list of instances)
32+
# Send 3 copies to channel 0
33+
# (argument can be an instance of canalystii.Message or a list of instances)
3334
dev.send(0, [new_message] * 3)
3435

3536
# Stop both channels (need to call start() again to resume capturing or send any messages)
@@ -39,7 +40,7 @@ dev.stop(1)
3940

4041
## Limitations
4142

42-
Currently, the following things are either not possible or not easy to support based on the known Canalyst-II protocol:
43+
Currently, the following things are not supported and may not be possible based on the known USB protocol:
4344

4445
* CAN bus error conditions. There is a function `get_can_status()` that seems to provide access to some internal device state, not clear if this can be used to determine when errors occured or invalid messages seen.
4546
* Receive buffer hardware overflow detection (see Performance, below).

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
import io
32
import os
43

tests/loopback_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_clear_rx_buffer(device):
8989
def test_bitrate_mismatch(device):
9090
def print_status(label, msg):
9191
print(f"{label}:")
92-
for field_name, field_type in msg._fields_:
92+
for field_name, _field_type in msg._fields_:
9393
if field_name != "padding":
9494
print(f" {field_name}={hex(getattr(msg, field_name))} ")
9595
print()

0 commit comments

Comments
 (0)