pymammotion 0.2.68__py3-none-any.whl → 0.2.69__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.
@@ -12,15 +12,13 @@ from jsonic.serializable import serialize
12
12
 
13
13
  from pymammotion.aliyun.tmp_constant import tmp_constant
14
14
  from pymammotion.bluetooth.const import UUID_WRITE_CHARACTERISTIC
15
- from pymammotion.bluetooth.data.convert import parse_custom_data
16
15
  from pymammotion.bluetooth.data.framectrldata import FrameCtrlData
17
16
  from pymammotion.bluetooth.data.notifydata import BlufiNotifyData
18
17
  from pymammotion.data.model.execute_boarder import ExecuteBorder
19
18
  from pymammotion.proto import (
20
19
  dev_net_pb2,
21
- luba_msg_pb2,
22
20
  )
23
- from pymammotion.proto.luba_msg import MsgCmdType, LubaMsg, MsgDevice, MsgAttr
21
+ from pymammotion.proto.luba_msg import LubaMsg, MsgAttr, MsgCmdType, MsgDevice
24
22
  from pymammotion.utility.constant.device_constant import bleOrderCmd
25
23
 
26
24
  _LOGGER = logging.getLogger(__name__)
@@ -145,7 +143,6 @@ class BleMessage:
145
143
  _LOGGER.debug("parseNotification data length less than 4")
146
144
  return -2
147
145
 
148
-
149
146
  sequence = int(response[2]) # toInt
150
147
 
151
148
  # Compare with the second counter, mod 255
@@ -157,7 +154,7 @@ class BleMessage:
157
154
  )
158
155
 
159
156
  # Set the value for mReadSequence manually
160
- self.mReadSequence = itertools.count(start=sequence)
157
+ self.mReadSequence = itertools.count(start=sequence - 1)
161
158
 
162
159
  # LogUtil.m7773e(self.mGatt.getDevice().getName() + "打印丢包率", self.mReadSequence_2 + "/" + self.mReadSequence_1);
163
160
  pkt_type = int(response[0]) # toInt
@@ -251,14 +248,8 @@ class BleMessage:
251
248
  # return;
252
249
  case 19:
253
250
  # # com/agilexrobotics/utils/EspBleUtil$BlufiCallbackMain.smali
254
- luba_msg = parse_custom_data(data) # parse to protobuf message
255
- # really need some sort of callback
256
- if luba_msg.HasField("net"):
257
- if luba_msg.net.HasField("toapp_wifi_iot_status"):
258
- # await sleep(1.5)
259
- _LOGGER.debug("sending ble sync")
260
- # await self.send_todev_ble_sync(2)
261
- return luba_msg
251
+ # luba_msg = parse_custom_data(data) # parse to protobuf message
252
+ return data
262
253
 
263
254
  # private void parseCtrlData(int i, byte[] bArr) {
264
255
  # if (i == 0) {
@@ -312,6 +303,7 @@ class BleMessage:
312
303
  # onPostCustomDataResult(status, data)
313
304
  # _LOGGER.debug(suc)
314
305
  except Exception as err:
306
+ await self.client.disconnect()
315
307
  _LOGGER.debug(err)
316
308
 
317
309
  async def post_custom_data(self, data_str: str) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.2.68
3
+ Version: 0.2.69
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -68,7 +68,7 @@ pip install pymammotion
68
68
  PyMammotion uses `betterproto` and `protoc` for generating protobuf models. To set up the development environment:
69
69
 
70
70
  1. Clone the repository
71
- 2. ???
71
+ 2. poetry install --with=dev
72
72
  3. Profit
73
73
 
74
74
  ## Contributing 🤝
@@ -12,7 +12,7 @@ pymammotion/aliyun/model/stream_subscription_response.py,sha256=po765WASQDboVCos
12
12
  pymammotion/aliyun/tmp_constant.py,sha256=M4Hq_lrGB3LZdX6R2XohRPFoK1NDnNV-pTJwJcJ9838,6650
13
13
  pymammotion/bluetooth/__init__.py,sha256=LAl8jqZ1fPh-3mLmViNQsP3s814C1vsocYUa6oSaXt0,36
14
14
  pymammotion/bluetooth/ble.py,sha256=C7H7j71fhsvBfI8QEa9PlY3Ugm2CK1CXI7CXqranM48,2470
15
- pymammotion/bluetooth/ble_message.py,sha256=k9yJBfZXA352rzA3csEQgk2prMNuM-r-0NPL1s1_f2c,15320
15
+ pymammotion/bluetooth/ble_message.py,sha256=toPhMOgmHEdHzvaOsgCUfrkjdI38oeS4Av0E-I8X0_s,14952
16
16
  pymammotion/bluetooth/const.py,sha256=CCqyHsYbB0BAYjwdhXt_n6eWWxmhlUrAFjvVv57mbvE,1749
17
17
  pymammotion/bluetooth/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  pymammotion/bluetooth/data/convert.py,sha256=6DMwvzVr9FWCoQFIKSI2poFXjISc_m6X59g8FlVO0-o,800
@@ -119,7 +119,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
119
119
  pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
120
120
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
121
121
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
122
- pymammotion-0.2.68.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
123
- pymammotion-0.2.68.dist-info/METADATA,sha256=GPRAhITGV9-PrjCNA6PGJWm32nKPm_cHw5T-PqVbJwk,3874
124
- pymammotion-0.2.68.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
125
- pymammotion-0.2.68.dist-info/RECORD,,
122
+ pymammotion-0.2.69.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
123
+ pymammotion-0.2.69.dist-info/METADATA,sha256=WB0DIDd6a9UIsShP0cBubzGQVOZJjvXNHNkOeMpfQnc,3896
124
+ pymammotion-0.2.69.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
125
+ pymammotion-0.2.69.dist-info/RECORD,,