Skip to content

Commit 0c7a18e

Browse files
author
Alberto Scotta
committed
document public methods that take arguments
1 parent ba2a457 commit 0c7a18e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

can/interfaces/slcan.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ def __init__(
107107
)
108108

109109
def set_bitrate(self, bitrate):
110+
"""
111+
:raise ValueError: if both *bitrate* is not among the possible values
112+
113+
:param int bitrate:
114+
Bitrate in bit/s
115+
"""
110116
self.close()
111117
if bitrate in self._BITRATES:
112118
self.write(self._BITRATES[bitrate])
@@ -117,6 +123,10 @@ def set_bitrate(self, bitrate):
117123
self.open()
118124

119125
def set_bitrate_reg(self, btr):
126+
"""
127+
:param str btr:
128+
BTR register value to set custom can speed
129+
"""
120130
self.close()
121131
self.write("s" + btr)
122132
self.open()

0 commit comments

Comments
 (0)