Skip to content

Commit 706268e

Browse files
committed
2 parents 7a6a8d2 + 6675ae0 commit 706268e

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# ChangeLog for pymycobot
22

3+
## v2.9.3 (2022-8-31)
4+
5+
- release v2.9.3
6+
- fix jog_increment() bug
7+
- Fixed an incorrect description of the set_fresh_mode interface
8+
39
## v2.9.2 (2022-8-8)
410

511
- release v2.9.2

docs/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ We support Python2, Python3.5 or later.
1919
- [is_controller_connected](#is_controller_connected)
2020
- [MDI mode and operation](#mdi-mode-and-operation)
2121
- [get_angles](#get_angles)
22+
- [set_fresh_mode(mode)](#set_fresh_modemode)
2223
- [send_angle](#send_angle)
2324
- [send_angles()](#send_angles)
2425
- [get_radians](#get_radians)
@@ -286,6 +287,16 @@ from pymycobot import MyCobot
286287

287288
- **Returns**: `list`: A float list of all degree.
288289

290+
### set_fresh_mode(mode)
291+
292+
Set command refresh mode
293+
294+
* **Parameters**
295+
296+
* **mode** – int
297+
1 - Always execute the latest command first.
298+
0 - Execute instructions sequentially in the form of a queue.
299+
289300
### send_angle
290301

291302
- **Prototype**: `send_angles(id, degree, speed)`
@@ -2077,8 +2088,8 @@ Set command refresh mode
20772088
* **id** – 1/2 (L/R).
20782089

20792090
* **mode** – int
2080-
0 - Always execute the latest command first.
2081-
1 - Execute instructions sequentially in the form of a queue.
2091+
1 - Always execute the latest command first.
2092+
0 - Execute instructions sequentially in the form of a queue.
20822093

20832094
### set_gripper_calibration(id)
20842095

pymycobot/generate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def jog_increment(self, joint_id, increment, speed):
373373
increment:
374374
speed: int (0 - 100)
375375
"""
376-
return self._mesg(ProtocolCode.JOG_INCREMENT, joint_id, increment, speed)
376+
return self._mesg(ProtocolCode.JOG_INCREMENT, joint_id, [self._angle2int(increment)], speed)
377377

378378
def jog_stop(self):
379379
"""Stop jog moving"""
@@ -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)