Skip to content

Commit 405c996

Browse files
author
shedfly
committed
minor tidy-up
1 parent 876e12c commit 405c996

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

can/interfaces/seeedstudio/seeedstudio.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ def init_frame(self, timeout=None):
128128
byte_msg.append(SeeedBus.OPERATIONMODE[self.op_mode])
129129
byte_msg.append(0x01) # Follows 'Send once' in windows app.
130130

131-
for _ in range(0, 4): # Manual bitrate config, details unknown.
132-
byte_msg.append(0x00)
131+
byte_msg.extend([0x00] * 4) # Manual bitrate config, details unknown.
133132

134133
crc = sum(byte_msg[2:]) & 0xFF
135134
byte_msg.append(crc)
@@ -156,8 +155,7 @@ def status_frame(self, timeout=None):
156155
byte_msg.append(0x00) # In response packet - Rx error count
157156
byte_msg.append(0x00) # In response packet - Tx error count
158157

159-
for _ in range(0, 14):
160-
byte_msg.append(0x00)
158+
byte_msg.extend([0x00] * 14)
161159

162160
crc = sum(byte_msg[2:]) & 0xFF
163161
byte_msg.append(crc)

doc/interfaces/seeedstudio.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Links:
1717

1818
Installation
1919
------------
20-
This interface has additional dependencies which can be installed using pip and the optional extra [seeedstudio]. That will install two additional packages if not already available:
20+
This interface has additional dependencies which can be installed using pip and the optional extra [seeedstudio]. That will install an additional packages if not already available:
2121
- pyserial
2222

2323

0 commit comments

Comments
 (0)