pymammotion 0.4.11__py3-none-any.whl → 0.4.12b1__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.
@@ -157,6 +157,18 @@ class HashList(DataClassORJSONMixin):
157
157
  if i not in all_hash_ids
158
158
  ]
159
159
 
160
+ def missing_root_hash_frame(self, hash_list: NavGetHashListAck) -> list[int]:
161
+ """Return missing root hash frame."""
162
+ target_root_list = next(
163
+ (
164
+ rhl
165
+ for rhl in self.root_hash_lists
166
+ if rhl.total_frame == hash_list.total_frame and rhl.sub_cmd == hash_list.sub_cmd
167
+ ),
168
+ None,
169
+ )
170
+ return self._find_missing_frames(target_root_list)
171
+
160
172
  def update_root_hash_list(self, hash_list: NavGetHashListData) -> None:
161
173
  target_root_list = next(
162
174
  (
@@ -235,6 +247,9 @@ class HashList(DataClassORJSONMixin):
235
247
 
236
248
  @staticmethod
237
249
  def _find_missing_frames(frame_list: FrameList | RootHashList) -> list[int]:
250
+ if frame_list is None:
251
+ return []
252
+
238
253
  if frame_list.total_frame == len(frame_list.data):
239
254
  return []
240
255
  number_list = list(range(1, frame_list.total_frame + 1))
@@ -46,7 +46,7 @@ class MammotionBaseDevice:
46
46
  async def datahash_response(self, hash_ack: NavGetHashListAck) -> None:
47
47
  """Handle datahash responses."""
48
48
 
49
- missing_frames = self.mower.map.missing_hash_frame(hash_ack)
49
+ missing_frames = self.mower.map.missing_root_hash_frame(hash_ack)
50
50
  if len(missing_frames) == 0:
51
51
  if len(self.mower.map.missing_hashlist) > 0:
52
52
  data_hash = self.mower.map.missing_hashlist.pop()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.4.11
3
+ Version: 0.4.12b1
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -31,7 +31,7 @@ pymammotion/data/model/enums.py,sha256=EpKmO8yVUZyEnTY4yH0DMMVKYNQM42zpW1maUu0i3
31
31
  pymammotion/data/model/excute_boarder_params.py,sha256=9CpUqrygcle1C_1hDW-riLmm4map4ZbE842NXjcomEI,1394
32
32
  pymammotion/data/model/execute_boarder.py,sha256=9rd_h4fbcsXxgnLOd2rO2hWyD1abnTGc47QTEpp8DD0,1103
33
33
  pymammotion/data/model/generate_route_information.py,sha256=pgjqURwmEIzjCMbl4Z5JDDkfxyUAdry1KhPfyir3-mU,777
34
- pymammotion/data/model/hash_list.py,sha256=8PTjTS9upK8ZKHHQZMFQTmFCoOHqvje0tGzAqyROAHU,9077
34
+ pymammotion/data/model/hash_list.py,sha256=Paztwh7ZetmDtbS9sDNpdaDB1bZKWUqJY06O3pkBuAw,9574
35
35
  pymammotion/data/model/location.py,sha256=PwmITejfI4pm7PI4rzqSuuHetwle6IJr_CV95435s2M,871
36
36
  pymammotion/data/model/mowing_modes.py,sha256=bBbRhDe-imZsXDR0TN0emQv6BiIkAlXJFb5isPEjgDk,1078
37
37
  pymammotion/data/model/plan.py,sha256=wGlcJT-w0EdbWK9jI838TCOm_MABFg7WoR664VB8RWg,2880
@@ -65,7 +65,7 @@ pymammotion/mammotion/commands/messages/video.py,sha256=YQGIxKx2prA0X01ovNmMkX6Y
65
65
  pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
66
  pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3TTad9wHIPsU9s,5640
67
67
  pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
68
- pymammotion/mammotion/devices/base.py,sha256=M8YiGc9Oi6gWGfjlaFHrkzKAfT4JQ4Pr7K9eTcp2GJM,10264
68
+ pymammotion/mammotion/devices/base.py,sha256=hmZZkhTtPyqvpEwN4jwsLCDztUL7w-F5vuZLjBWCIZ8,10269
69
69
  pymammotion/mammotion/devices/mammotion.py,sha256=Zz2tUIdGA-jFSHLM3aO8tBMvVl7sBIBiqC9Kg7f-lm8,13190
70
70
  pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=0c-HXawLQVHz28s0HKaSCNq4wmLWJZZ3ATDVnCXdSrc,19579
71
71
  pymammotion/mammotion/devices/mammotion_cloud.py,sha256=gLdxaD759QphR10LsQchTTOHZi6jvnI2EHlbhMfsXvE,14373
@@ -117,7 +117,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
117
117
  pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
118
118
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
119
119
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
120
- pymammotion-0.4.11.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
121
- pymammotion-0.4.11.dist-info/METADATA,sha256=FBZkAzoPsVivbbmMHe5fnnTh7viBsYwFcatQL0923xs,3834
122
- pymammotion-0.4.11.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
123
- pymammotion-0.4.11.dist-info/RECORD,,
120
+ pymammotion-0.4.12b1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
121
+ pymammotion-0.4.12b1.dist-info/METADATA,sha256=nSFLyzHNqCmfX-cGjMdjWGADYmlxbRl1OQn0R8mYpA0,3836
122
+ pymammotion-0.4.12b1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
123
+ pymammotion-0.4.12b1.dist-info/RECORD,,