pymammotion 0.0.53__py3-none-any.whl → 0.0.54__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.

@@ -215,6 +215,9 @@ class MammotionBaseDevice:
215
215
  def _update_nav_data(self, tmp_msg):
216
216
  """Update navigation data."""
217
217
  nav_sub_msg = betterproto.which_one_of(tmp_msg.nav, "SubNavMsg")
218
+ if nav_sub_msg[1] is None:
219
+ _LOGGER.debug("Sub message was NoneType %s", nav_sub_msg[0])
220
+ return
218
221
  nav = self._raw_data.get("nav", {})
219
222
  if isinstance(nav_sub_msg[1], int):
220
223
  nav[nav_sub_msg[0]] = nav_sub_msg[1]
@@ -225,6 +228,9 @@ class MammotionBaseDevice:
225
228
  def _update_sys_data(self, tmp_msg):
226
229
  """Update system data."""
227
230
  sys_sub_msg = betterproto.which_one_of(tmp_msg.sys, "SubSysMsg")
231
+ if sys_sub_msg[1] is None:
232
+ _LOGGER.debug("Sub message was NoneType %s", sys_sub_msg[0])
233
+ return
228
234
  sys = self._raw_data.get("sys", {})
229
235
  sys[sys_sub_msg[0]] = sys_sub_msg[1].to_dict(casing=betterproto.Casing.SNAKE)
230
236
  self._raw_data["sys"] = sys
@@ -232,6 +238,9 @@ class MammotionBaseDevice:
232
238
  def _update_driver_data(self, tmp_msg):
233
239
  """Update driver data."""
234
240
  drv_sub_msg = betterproto.which_one_of(tmp_msg.driver, "SubDrvMsg")
241
+ if drv_sub_msg[1] is None:
242
+ _LOGGER.debug("Sub message was NoneType %s", drv_sub_msg[0])
243
+ return
235
244
  drv = self._raw_data.get("driver", {})
236
245
  drv[drv_sub_msg[0]] = drv_sub_msg[1].to_dict(casing=betterproto.Casing.SNAKE)
237
246
  self._raw_data["driver"] = drv
@@ -239,6 +248,9 @@ class MammotionBaseDevice:
239
248
  def _update_net_data(self, tmp_msg):
240
249
  """Update network data."""
241
250
  net_sub_msg = betterproto.which_one_of(tmp_msg.net, "NetSubType")
251
+ if net_sub_msg[1] is None:
252
+ _LOGGER.debug("Sub message was NoneType %s", net_sub_msg[0])
253
+ return
242
254
  net = self._raw_data.get("net", {})
243
255
  if isinstance(net_sub_msg[1], int):
244
256
  net[net_sub_msg[0]] = net_sub_msg[1]
@@ -249,6 +261,9 @@ class MammotionBaseDevice:
249
261
  def _update_mul_data(self, tmp_msg):
250
262
  """Update mul data."""
251
263
  mul_sub_msg = betterproto.which_one_of(tmp_msg.mul, "SubMul")
264
+ if mul_sub_msg[1] is None:
265
+ _LOGGER.debug("Sub message was NoneType %s", mul_sub_msg[0])
266
+ return
252
267
  mul = self._raw_data.get("mul", {})
253
268
  mul[mul_sub_msg[0]] = mul_sub_msg[1].to_dict(casing=betterproto.Casing.SNAKE)
254
269
  self._raw_data["mul"] = mul
@@ -256,6 +271,9 @@ class MammotionBaseDevice:
256
271
  def _update_ota_data(self, tmp_msg):
257
272
  """Update OTA data."""
258
273
  ota_sub_msg = betterproto.which_one_of(tmp_msg.ota, "SubOtaMsg")
274
+ if ota_sub_msg[1] is None:
275
+ _LOGGER.debug("Sub message was NoneType %s", ota_sub_msg[0])
276
+ return
259
277
  ota = self._raw_data.get("ota", {})
260
278
  ota[ota_sub_msg[0]] = ota_sub_msg[1].to_dict(casing=betterproto.Casing.SNAKE)
261
279
  self._raw_data["ota"] = ota
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.0.53
3
+ Version: 0.0.54
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -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=nIErRyKQa1wlyBdzx-cmlf0EnYxs-cyFooWLXYKQXQE,29936
58
+ pymammotion/mammotion/devices/mammotion.py,sha256=EmL9DsqLQGK-6WaZrH28H6UqmAV67dnQ-ZoqBmnkv1E,30698
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.53.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
106
- pymammotion-0.0.53.dist-info/METADATA,sha256=IdOPpZXKqx9It6jOumkhyVDL0-i2Ex7X79Zy-ajSp_g,3884
107
- pymammotion-0.0.53.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
108
- pymammotion-0.0.53.dist-info/RECORD,,
105
+ pymammotion-0.0.54.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
106
+ pymammotion-0.0.54.dist-info/METADATA,sha256=q5VX7kLNJcao53UKtFiMucKYlwCw4OVf6bP63FlUncM,3884
107
+ pymammotion-0.0.54.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
108
+ pymammotion-0.0.54.dist-info/RECORD,,