diff --git a/CHANGELOG.md b/CHANGELOG.md index 98e4f2b..5f32892 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # ChangeLog for pymycobot +## v2.9.5(2022-9-13) + +- release v2.9.5 +- Add MyBuddy serial open(),is_open() function +- Add MyBuddy example + ## v2.9.4 (2022-9-8) - release v2.9.4 diff --git a/pymycobot/Interface.py b/pymycobot/Interface.py index cc33793..9565e2e 100644 --- a/pymycobot/Interface.py +++ b/pymycobot/Interface.py @@ -1125,4 +1125,4 @@ def set_encoders_drag(self, id, encoders, speeds): # def init_iic(self): # from smbus2 import SMBus - # i2c = SMBus(1) # 1 代表 /dev/i2c-1 + # i2c = SMBus(1) # 1 代表 /dev/i2c-1 \ No newline at end of file diff --git a/pymycobot/__init__.py b/pymycobot/__init__.py index a8536e5..e593895 100644 --- a/pymycobot/__init__.py +++ b/pymycobot/__init__.py @@ -30,7 +30,7 @@ "Mira" ] -__version__ = "2.9.4-beta-0.2" +__version__ = "2.9.5" __author__ = "Elephantrobotics" __email__ = "weiquan.xu@elephantrobotics.com" __git_url__ = "https://github.com/elephantrobotics/pymycobot" diff --git a/pymycobot/mybuddy.py b/pymycobot/mybuddy.py index 6332fa4..598319f 100644 --- a/pymycobot/mybuddy.py +++ b/pymycobot/mybuddy.py @@ -375,4 +375,10 @@ def wait(self, t): return self def close(self): - self._serial_port.close() + self._serial_port.close() + + def open(self): + self._serial_port.open() + + def is_open(self): + return self._serial_port.isOpen()