Skip to content

Commit 6817066

Browse files
authored
Make pause after sending SDO request configurable (#429)
1 parent d38045f commit 6817066

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

canopen/sdo/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class SdoClient(SdoBase):
2525
#: Seconds to wait before sending a request, for rate limiting
2626
PAUSE_BEFORE_SEND = 0.0
2727

28+
#: Seconds to wait after sending a request
29+
PAUSE_AFTER_SEND = 0.1
30+
2831
def __init__(self, rx_cobid, tx_cobid, od):
2932
"""
3033
:param int rx_cobid:
@@ -53,7 +56,8 @@ def send_request(self, request):
5356
if not retries_left:
5457
raise
5558
logger.info(str(e))
56-
time.sleep(0.1)
59+
if self.PAUSE_AFTER_SEND:
60+
time.sleep(self.PAUSE_AFTER_SEND)
5761
else:
5862
break
5963

0 commit comments

Comments
 (0)