pymammotion 0.0.41__py3-none-any.whl → 0.0.42__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pymammotion might be problematic. Click here for more details.

pymammotion/__init__.py CHANGED
@@ -16,6 +16,16 @@ from pymammotion.http.http import LubaHTTP, connect_http
16
16
  from pymammotion.mammotion.devices import MammotionBaseBLEDevice
17
17
  from pymammotion.mqtt import MammotionMQTT
18
18
 
19
+
20
+
21
+ __all__ = [
22
+ 'LubaBLE',
23
+ 'LubaHTTP',
24
+ 'connect_http',
25
+ 'MammotionBaseBLEDevice',
26
+ 'MammotionMQTT'
27
+ ]
28
+
19
29
  logger = logging.getLogger(__name__)
20
30
 
21
31
  # TODO provide interface to pick between mqtt/cloud/bluetooth
@@ -325,7 +325,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
325
325
 
326
326
  def schedule_ble_sync(self):
327
327
  """Periodically sync to keep connection alive."""
328
- if self._client.is_connected:
328
+ if self._client is not None and self._client.is_connected:
329
329
  self._ble_sync_task = self.loop.call_later(
330
330
  130, lambda: asyncio.ensure_future(self.run_periodic_sync_task())
331
331
  )
@@ -462,7 +462,6 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
462
462
  )
463
463
  self._reset_disconnect_timer()
464
464
  await self._start_notify()
465
- # don't await this
466
465
  self.schedule_ble_sync()
467
466
 
468
467
  async def _send_command_locked(self, key: str, command: bytes) -> bytes:
@@ -561,14 +560,10 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
561
560
  if not self._read_char:
562
561
  self._read_char = READ_CHAR_UUID
563
562
  _LOGGER.error(CharacteristicMissingError(READ_CHAR_UUID))
564
- """Sometimes the robot doesn't report this correctly."""
565
- # raise CharacteristicMissingError(READ_CHAR_UUID)
566
563
  self._write_char = services.get_characteristic(WRITE_CHAR_UUID)
567
564
  if not self._write_char:
568
565
  self._write_char = WRITE_CHAR_UUID
569
566
  _LOGGER.error(CharacteristicMissingError(WRITE_CHAR_UUID))
570
- """Sometimes the robot doesn't report this correctly."""
571
- # raise CharacteristicMissingError(WRITE_CHAR_UUID)
572
567
 
573
568
  def _reset_disconnect_timer(self):
574
569
  """Reset disconnect timer."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.0.41
3
+ Version: 0.0.42
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -1,4 +1,4 @@
1
- pymammotion/__init__.py,sha256=4IPNlcivNtnipKurk9T7gI0G7dTxhnceptnKy4HQWbw,1412
1
+ pymammotion/__init__.py,sha256=Hf_TaQAcSiPIwtxcGvznzCB0EOnJmrnZ9PQEqQhmitM,1530
2
2
  pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
3
3
  pymammotion/aliyun/cloud_gateway.py,sha256=3j6y4yrN0Gf0T-jbultLqQeEEihdkjn3uSdUodQ30Dw,18295
4
4
  pymammotion/aliyun/cloud_service.py,sha256=YWcKuKK6iRWy5mTnBYgHxcCusiRGGzQt3spSf7dGDss,2183
@@ -55,7 +55,7 @@ pymammotion/mammotion/commands/messages/video.py,sha256=_8lJsU4sLm2CGnc7RDkueA0A
55
55
  pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  pymammotion/mammotion/control/joystick.py,sha256=EWV20MMzQuhbLlNlXbsyZKSEpeM7x1CQL7saU4Pn0-g,6165
57
57
  pymammotion/mammotion/devices/__init__.py,sha256=T72jt0ejtMjo1rPmn_FeMF3pmp0LLeRRpc9WcDKEYYY,126
58
- pymammotion/mammotion/devices/mammotion.py,sha256=essMQmKfmQsBdEoxHrfk5BJshnKX6Ev48e-JQTbgrBA,29130
58
+ pymammotion/mammotion/devices/mammotion.py,sha256=o3ouCcmLXeeEPfsR9cxPBjqDreWeihT3qMwS0r8PpW4,28863
59
59
  pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
60
60
  pymammotion/mqtt/mammotion_mqtt.py,sha256=EBnUwqah-mZNcAn5Hq2sV3NKXueIYWNhYPiaXwaXdHg,9084
61
61
  pymammotion/proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -102,7 +102,7 @@ pymammotion/utility/datatype_converter.py,sha256=v6zym2Zu0upxQjR-xDqXwi3516zpntS
102
102
  pymammotion/utility/device_type.py,sha256=B_Y1WCRPlFMDOqC13H0ltInyPkbPMIxCoZccCC13fmc,8154
103
103
  pymammotion/utility/periodic.py,sha256=9wJMfwXPlx6Mbp3Fws7LLTI34ZDKphH1bva_Ggyk32g,3281
104
104
  pymammotion/utility/rocker_util.py,sha256=syPL0QN4zMzHiTIkUKS7RXBBptjdbkfNlPddwUD5V3A,7171
105
- pymammotion-0.0.41.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
106
- pymammotion-0.0.41.dist-info/METADATA,sha256=l0nk0b1URsuCovCc-tp01KwU0mp89XPXv-KPuJkqj40,3825
107
- pymammotion-0.0.41.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
108
- pymammotion-0.0.41.dist-info/RECORD,,
105
+ pymammotion-0.0.42.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
106
+ pymammotion-0.0.42.dist-info/METADATA,sha256=olfX90eDNH8dYurgnjlqqdmw9tfT8-iNWXRMg8eM1sA,3825
107
+ pymammotion-0.0.42.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
108
+ pymammotion-0.0.42.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.8.1
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any