pymammotion 0.4.12b1__tar.gz → 0.4.13__tar.gz

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.
Files changed (123) hide show
  1. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/PKG-INFO +1 -1
  2. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/ble.py +2 -4
  3. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/device.py +0 -2
  4. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/hash_list.py +14 -4
  5. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/devices/base.py +11 -5
  6. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pyproject.toml +2 -2
  7. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/LICENSE +0 -0
  8. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/README.md +0 -0
  9. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/__init__.py +0 -0
  10. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/__init__.py +0 -0
  11. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/cloud_gateway.py +0 -0
  12. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/model/aep_response.py +0 -0
  13. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/model/connect_response.py +0 -0
  14. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/model/dev_by_account_response.py +0 -0
  15. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/model/login_by_oauth_response.py +0 -0
  16. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/model/regions_response.py +0 -0
  17. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/model/session_by_authcode_response.py +0 -0
  18. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/model/stream_subscription_response.py +0 -0
  19. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/aliyun/tmp_constant.py +0 -0
  20. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/__init__.py +0 -0
  21. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/ble_message.py +0 -0
  22. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/const.py +0 -0
  23. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/data/__init__.py +0 -0
  24. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/data/convert.py +0 -0
  25. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/data/framectrldata.py +0 -0
  26. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/data/notifydata.py +0 -0
  27. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/model/__init__.py +0 -0
  28. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/bluetooth/model/atomic_integer.py +0 -0
  29. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/const.py +0 -0
  30. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/__init__.py +0 -0
  31. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/__init__.py +0 -0
  32. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/account.py +0 -0
  33. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/device_config.py +0 -0
  34. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/device_info.py +0 -0
  35. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/device_limits.py +0 -0
  36. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/enums.py +0 -0
  37. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/excute_boarder_params.py +0 -0
  38. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/execute_boarder.py +0 -0
  39. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/generate_route_information.py +0 -0
  40. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/location.py +0 -0
  41. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/mowing_modes.py +0 -0
  42. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/plan.py +0 -0
  43. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/rapid_state.py +0 -0
  44. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/raw_data.py +0 -0
  45. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/region_data.py +0 -0
  46. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/model/report_info.py +0 -0
  47. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/mqtt/__init__.py +0 -0
  48. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/mqtt/event.py +0 -0
  49. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/mqtt/properties.py +0 -0
  50. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/mqtt/status.py +0 -0
  51. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/data/state_manager.py +0 -0
  52. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/event/__init__.py +0 -0
  53. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/event/event.py +0 -0
  54. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/http/_init_.py +0 -0
  55. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/http/encryption.py +0 -0
  56. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/http/http.py +0 -0
  57. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/http/model/http.py +0 -0
  58. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/__init__.py +0 -0
  59. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/__init__.py +0 -0
  60. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/abstract_message.py +0 -0
  61. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/mammotion_command.py +0 -0
  62. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/__init__.py +0 -0
  63. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/driver.py +0 -0
  64. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/media.py +0 -0
  65. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/navigation.py +0 -0
  66. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/network.py +0 -0
  67. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/ota.py +0 -0
  68. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/system.py +0 -0
  69. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/commands/messages/video.py +0 -0
  70. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/control/__init__.py +0 -0
  71. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/control/joystick.py +0 -0
  72. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/devices/__init__.py +0 -0
  73. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/devices/mammotion.py +0 -0
  74. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/devices/mammotion_bluetooth.py +0 -0
  75. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mammotion/devices/mammotion_cloud.py +0 -0
  76. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mqtt/__init__.py +0 -0
  77. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mqtt/linkkit/__init__.py +0 -0
  78. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mqtt/linkkit/h2client.py +0 -0
  79. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mqtt/linkkit/linkkit.py +0 -0
  80. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mqtt/mammotion_future.py +0 -0
  81. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/mqtt/mammotion_mqtt.py +0 -0
  82. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/__init__.py +0 -0
  83. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/basestation.proto +0 -0
  84. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/basestation_pb2.py +0 -0
  85. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/basestation_pb2.pyi +0 -0
  86. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/common.proto +0 -0
  87. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/common_pb2.py +0 -0
  88. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/common_pb2.pyi +0 -0
  89. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/dev_net.proto +0 -0
  90. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/dev_net_pb2.py +0 -0
  91. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/dev_net_pb2.pyi +0 -0
  92. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/luba_msg.proto +0 -0
  93. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/luba_msg_pb2.py +0 -0
  94. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/luba_msg_pb2.pyi +0 -0
  95. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/luba_mul.proto +0 -0
  96. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/luba_mul_pb2.py +0 -0
  97. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/luba_mul_pb2.pyi +0 -0
  98. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_driver.proto +0 -0
  99. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_driver_pb2.py +0 -0
  100. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_driver_pb2.pyi +0 -0
  101. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_nav.proto +0 -0
  102. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_nav_pb2.py +0 -0
  103. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_nav_pb2.pyi +0 -0
  104. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_ota.proto +0 -0
  105. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_ota_pb2.py +0 -0
  106. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_ota_pb2.pyi +0 -0
  107. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_pept.proto +0 -0
  108. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_pept_pb2.py +0 -0
  109. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_pept_pb2.pyi +0 -0
  110. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_sys.proto +0 -0
  111. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_sys_pb2.py +0 -0
  112. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/proto/mctrl_sys_pb2.pyi +0 -0
  113. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/py.typed +0 -0
  114. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/constant/__init__.py +0 -0
  115. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/constant/device_constant.py +0 -0
  116. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/conversions.py +0 -0
  117. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/datatype_converter.py +0 -0
  118. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/device_config.py +0 -0
  119. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/device_type.py +0 -0
  120. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/map.py +0 -0
  121. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/movement.py +0 -0
  122. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/periodic.py +0 -0
  123. {pymammotion-0.4.12b1 → pymammotion-0.4.13}/pymammotion/utility/rocker_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.4.12b1
3
+ Version: 0.4.13
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -36,12 +36,10 @@ class MammotionBLE:
36
36
  return await self.connect()
37
37
 
38
38
  async def connect(self) -> bool:
39
- if self.client is not None:
40
- return await self.client.connect()
39
+ return await self.client.connect() if self.client is not None else False
41
40
 
42
41
  async def disconnect(self) -> bool:
43
- if self.client is not None:
44
- return await self.client.disconnect()
42
+ return await self.client.disconnect() if self.client is not None else False
45
43
 
46
44
  async def notification_handler(self, _characteristic: BleakGATTCharacteristic, data: bytearray) -> None:
47
45
  """Simple notification handler which prints the data received."""
@@ -92,8 +92,6 @@ class MowingDevice(DataClassORJSONMixin):
92
92
  self.location.work_zone = (
93
93
  location.zone_hash if self.report_data.dev.sys_status == WorkMode.MODE_WORKING else 0
94
94
  )
95
- if location.bol_hash:
96
- self.map.bol_hash = location.bol_hash
97
95
 
98
96
  if toapp_report_data.fw_info:
99
97
  self.update_device_firmwares(toapp_report_data.fw_info)
@@ -120,7 +120,6 @@ class HashList(DataClassORJSONMixin):
120
120
  hashlist for all our hashIDs for verification
121
121
  """
122
122
 
123
- bol_hash: str = ""
124
123
  root_hash_lists: list[RootHashList] = field(default_factory=list)
125
124
  area: dict[int, FrameList] = field(default_factory=dict) # type 0
126
125
  path: dict[int, FrameList] = field(default_factory=dict) # type 2
@@ -135,6 +134,11 @@ class HashList(DataClassORJSONMixin):
135
134
  self.obstacle = {hash_id: frames for hash_id, frames in self.obstacle.items() if hash_id in hashlist}
136
135
  self.dump = {hash_id: frames for hash_id, frames in self.dump.items() if hash_id in hashlist}
137
136
  self.svg = {hash_id: frames for hash_id, frames in self.svg.items() if hash_id in hashlist}
137
+ self.area_name = [
138
+ area_item
139
+ for area_item in self.area_name
140
+ if area_item.hash in self.area.keys() or area_item.hash in hashlist
141
+ ]
138
142
 
139
143
  @property
140
144
  def hashlist(self) -> list[int]:
@@ -143,8 +147,7 @@ class HashList(DataClassORJSONMixin):
143
147
  # Combine data_couple from all RootHashLists
144
148
  return [i for root_list in self.root_hash_lists for obj in root_list.data for i in obj.data_couple]
145
149
 
146
- @property
147
- def missing_hashlist(self) -> list[int]:
150
+ def missing_hashlist(self, sub_cmd: int = 0) -> list[int]:
148
151
  """Return missing hashlist."""
149
152
  all_hash_ids = set(self.area.keys()).union(
150
153
  self.path.keys(), self.obstacle.keys(), self.dump.keys(), self.svg.keys()
@@ -153,6 +156,7 @@ class HashList(DataClassORJSONMixin):
153
156
  i
154
157
  for root_list in self.root_hash_lists
155
158
  for obj in root_list.data
159
+ if root_list.sub_cmd == sub_cmd
156
160
  for i in obj.data_couple
157
161
  if i not in all_hash_ids
158
162
  ]
@@ -167,6 +171,9 @@ class HashList(DataClassORJSONMixin):
167
171
  ),
168
172
  None,
169
173
  )
174
+ if target_root_list is None:
175
+ return []
176
+
170
177
  return self._find_missing_frames(target_root_list)
171
178
 
172
179
  def update_root_hash_list(self, hash_list: NavGetHashListData) -> None:
@@ -224,12 +231,15 @@ class HashList(DataClassORJSONMixin):
224
231
 
225
232
  def update(self, hash_data: NavGetCommData | SvgMessage) -> bool:
226
233
  """Update the map data."""
234
+
227
235
  if hash_data.type == PathType.AREA:
228
236
  existing_name = next((area for area in self.area_name if area.hash == hash_data.hash), None)
229
237
  if not existing_name:
230
238
  name = f"area {len(self.area_name)+1}" if hash_data.area_label is None else hash_data.area_label.label
231
239
  self.area_name.append(AreaHashNameList(name=name, hash=hash_data.hash))
232
- return self._add_hash_data(self.area, hash_data)
240
+ result = self._add_hash_data(self.area, hash_data)
241
+ self.update_hash_lists(self.hashlist)
242
+ return result
233
243
 
234
244
  if hash_data.type == PathType.OBSTACLE:
235
245
  return self._add_hash_data(self.obstacle, hash_data)
@@ -48,8 +48,8 @@ class MammotionBaseDevice:
48
48
 
49
49
  missing_frames = self.mower.map.missing_root_hash_frame(hash_ack)
50
50
  if len(missing_frames) == 0:
51
- if len(self.mower.map.missing_hashlist) > 0:
52
- data_hash = self.mower.map.missing_hashlist.pop()
51
+ if len(self.mower.map.missing_hashlist(hash_ack.sub_cmd)) > 0:
52
+ data_hash = self.mower.map.missing_hashlist(hash_ack.sub_cmd).pop()
53
53
  return await self.queue_command("synchronize_hash_data", hash_num=data_hash)
54
54
  return
55
55
 
@@ -67,7 +67,11 @@ class MammotionBaseDevice:
67
67
  if len(missing_frames) == 0:
68
68
  # get next in hash ack list
69
69
 
70
- data_hash = self.mower.map.missing_hashlist.pop() if len(self.mower.map.missing_hashlist) > 0 else None
70
+ data_hash = (
71
+ self.mower.map.missing_hashlist(common_data.sub_cmd).pop()
72
+ if len(self.mower.map.missing_hashlist(common_data.sub_cmd)) > 0
73
+ else None
74
+ )
71
75
  if data_hash is None:
72
76
  return
73
77
 
@@ -205,14 +209,16 @@ class MammotionBaseDevice:
205
209
  async def start_map_sync(self) -> None:
206
210
  """Start sync of map data."""
207
211
 
212
+ self.mower.map.update_hash_lists(self.mower.map.hashlist)
213
+
208
214
  if self._cloud_device and len(self.mower.map.area_name) == 0 and not DeviceType.is_luba1(self.mower.name):
209
215
  await self.queue_command("get_area_name_list", device_id=self._cloud_device.iotId)
210
216
 
211
217
  await self.queue_command("read_plan", sub_cmd=2, plan_index=0)
212
218
 
213
219
  await self.queue_command("get_all_boundary_hash_list", sub_cmd=0)
214
- if len(self.mower.map.missing_hashlist) > 0:
215
- data_hash = self.mower.map.missing_hashlist.pop()
220
+ if len(self.mower.map.missing_hashlist()) > 0:
221
+ data_hash = self.mower.map.missing_hashlist().pop()
216
222
  await self.queue_command("synchronize_hash_data", hash_num=data_hash)
217
223
 
218
224
  # sub_cmd 3 is job hashes??
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "pymammotion"
7
- version = "0.4.12-beta1"
7
+ version = "0.4.13"
8
8
  license = "GPL-3.0"
9
9
  description = ""
10
10
  readme = "README.md"
@@ -66,7 +66,7 @@ autotyping = "^24.3.0"
66
66
  ipython = "^9.0.2"
67
67
 
68
68
  [tool.bumpver]
69
- current_version = "0.4.12-beta1"
69
+ current_version = "0.4.13"
70
70
  version_pattern = "MAJOR.MINOR.PATCH"
71
71
  commit_message = "Bump version {old_version} -> {new_version}"
72
72
  commit = true
File without changes
File without changes