Skip to content

Commit c8e917b

Browse files
committed
Non-standard baudrates are supported on the latest Mac OS
1 parent af43c78 commit c8e917b

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

python/src/dynamixel_sdk/port_handler.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,8 @@ def setupPort(self, cflag_baud):
129129
return True
130130

131131
def getCFlagBaud(self, baudrate):
132-
if platform.system() == 'Darwin':
133-
if baudrate in [9600, 19200, 38400, 57600, 115200]:
134-
return baudrate
135-
else:
136-
return -1
132+
if baudrate in [9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 576000, 921600, 1000000, 1152000,
133+
2000000, 2500000, 3000000, 3500000, 4000000]:
134+
return baudrate
137135
else:
138-
if baudrate in [9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 576000, 921600, 1000000, 1152000,
139-
2000000, 2500000, 3000000, 3500000, 4000000]:
140-
return baudrate
141-
else:
142-
return -1
136+
return -1

0 commit comments

Comments
 (0)