Add hardware handshake support for serial port based CAN interfaces#402
Add hardware handshake support for serial port based CAN interfaces#402felixdivo merged 2 commits intohardbyte:developfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #402 +/- ##
===========================================
- Coverage 59.26% 59.25% -0.01%
===========================================
Files 55 55
Lines 4262 4261 -1
===========================================
- Hits 2526 2525 -1
Misses 1736 1736 |
felixdivo
left a comment
There was a problem hiding this comment.
The rtscts param should be documented in the docstrings.
can/interfaces/serial/serial_can.py
Outdated
| raise ValueError("Must specify a serial port.") | ||
|
|
||
| self.channel_info = "Serial interface: " + channel | ||
| rtscts = kwargs.get('rtscts', False) |
There was a problem hiding this comment.
This could be done simpler and easier to read by making this a keyword argument of the __init__() method, like with baudrate or timeout. Same applies for the other constructor.
There was a problem hiding this comment.
pylint was complaining about too many call parameters in __init__, so I decided to use kwargs. Should I make it a keyword argument anyway?
There was a problem hiding this comment.
Well, I don't see the problem with more parameters ... makes it way easier to spot the options and defaults.
pySerial module provides 'rtscts' option to handle hardware handshake.
This setting will be extracted from __init__'s kwargs.
Example:
bus = can.interface.Bus(bustype='slcan',
channel='/dev/ttyUSB0@3000000',
bitrate=1000000,
rtscts=True)
|
v2: move rtscts argument to the parameter list and also document it. |
|
Are you planning to resolve all 8 remaining issues for 2.3 or there could be an earlier release? |
|
@hardbyte What do you think? |
pySerial module provides 'rtscts' option to handle hardware handshake.
This setting will be extracted from init's kwargs.
Example:
Closes #398