Skip to content

Commit 8b89216

Browse files
committed
update test gui.
1 parent be5484d commit 8b89216

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pymycobot/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from pymycobot.mycobot import MyCobot
44
from pymycobot.generate import MycobotCommandGenerater
55
from pymycobot.genre import Angle, Coord
6+
from pymycobot import utils
67

78
__all__ = ["MyCobot", "MycobotCommandGenerater", "Angle", "Coord", "utils"]
89

tests/rasp_mycobot_test_gui.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def calibration_mycobot(self):
220220
if self.calibration_num == 6:
221221
self.write_log_to_Text("全部校准完成.")
222222
self.calibration_num = None
223+
self.rectify_mycobot()
223224
self._calibration_test()
224225

225226
def send_color(self, color: str):
@@ -310,6 +311,7 @@ def _aging_test(self):
310311
311312
def aging_test():
312313
# fast
314+
mycobot.set_color(255, 0, 0)
313315
mycobot.wait(5).send_angles([0, 0, 0, 0, 0, 0], 95)
314316
mycobot.wait(3).send_angles([170, 0, 0, 0, 0, 0], 95)
315317
mycobot.wait(3).send_angles([-170, 0, 0, 0, 0, 0], 95)
@@ -330,6 +332,7 @@ def aging_test():
330332
mycobot.wait(3).send_angles([0, 0, 0, 0, 0, -180], 95)
331333
332334
# middle
335+
mycobot.set_color(0, 255, 0)
333336
mycobot.wait(3).send_angles([0, 0, 0, 0, 0, 0], 55)
334337
mycobot.wait(5).send_angles([170, 0, 0, 0, 0, 0], 55)
335338
mycobot.wait(6.5).send_angles([-170, 0, 0, 0, 0, 0], 55)
@@ -350,6 +353,7 @@ def aging_test():
350353
mycobot.wait(5).send_angles([0, 0, 0, 0, 0, -180], 55)
351354
352355
# slow
356+
mycobot.set_color(0, 0, 255)
353357
mycobot.wait(5).send_angles([0, 0, 0, 0, 0, 0], 15)
354358
mycobot.wait(7).send_angles([170, 0, 0, 0, 0, 0], 15)
355359
mycobot.wait(7).send_angles([-170, 0, 0, 0, 0, 0], 15)

0 commit comments

Comments
 (0)