Skip to content

Commit 2a039d8

Browse files
committed
Modify the description of the set_fresh_mode interface
1 parent 11e7504 commit 2a039d8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pymycobot/generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,8 @@ def set_fresh_mode(self, mode): # TODO 22-5-19 need test
944944
945945
Args:
946946
mode: int.
947-
0 - Always execute the latest command first.
948-
1 - Execute instructions sequentially in the form of a queue.
947+
1 - Always execute the latest command first.
948+
0 - Execute instructions sequentially in the form of a queue.
949949
"""
950950
return self._mesg(ProtocolCode.SET_FRESH_MODE, mode)
951951

pymycobot/mira.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ def __init__(self, port, baudrate="115200", timeout=0.1):
1414
debug : whether show debug info
1515
"""
1616
import serial
17-
self._serial_port = serial.Serial(port, baudrate, timeout=timeout)
17+
self._serial_port = serial.Serial()
18+
self._serial_port.port = port
19+
self._serial_port.baudrate = baudrate
20+
self._serial_port.timeout = timeout
21+
self._serial_port.rts = False
22+
self._serial_port.open()
1823

1924
def _read(self):
2025
time.sleep(0.1)

0 commit comments

Comments
 (0)