pymammotion 0.2.45__py3-none-any.whl → 0.2.47__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.
- pymammotion/data/model/hash_list.py +1 -1
- pymammotion/mammotion/commands/mammotion_command.py +8 -8
- {pymammotion-0.2.45.dist-info → pymammotion-0.2.47.dist-info}/METADATA +1 -1
- {pymammotion-0.2.45.dist-info → pymammotion-0.2.47.dist-info}/RECORD +6 -6
- {pymammotion-0.2.45.dist-info → pymammotion-0.2.47.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.45.dist-info → pymammotion-0.2.47.dist-info}/WHEEL +0 -0
@@ -42,7 +42,7 @@ class HashList(DataClassORJSONMixin):
|
|
42
42
|
area_name: list[AreaHashNameList] = field(default_factory=list)
|
43
43
|
|
44
44
|
def set_hashlist(self, hashlist: list[int]) -> None:
|
45
|
-
self.hashlist = hashlist
|
45
|
+
self.hashlist = [x for x in hashlist if not (x in self.hashlist or self.hashlist.append(x))]
|
46
46
|
self.area = {hash_id: frames for hash_id, frames in self.area.items() if hash_id in hashlist}
|
47
47
|
self.path = {hash_id: frames for hash_id, frames in self.path.items() if hash_id in hashlist}
|
48
48
|
self.obstacle = {hash_id: frames for hash_id, frames in self.obstacle.items() if hash_id in hashlist}
|
@@ -24,26 +24,26 @@ class MammotionCommand(MessageSystem, MessageNavigation, MessageNetwork, Message
|
|
24
24
|
def set_device_product_key(self, product_key: str) -> None:
|
25
25
|
self._product_key = product_key
|
26
26
|
|
27
|
-
def move_forward(self, linear: float) ->
|
27
|
+
def move_forward(self, linear: float) -> bytes:
|
28
28
|
"""Move forward. values 0.0 1.0."""
|
29
29
|
linear_percent = get_percent(abs(linear * 100))
|
30
30
|
(linear_speed, angular_speed) = transform_both_speeds(90.0, 0.0, linear_percent, 0.0)
|
31
|
-
self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
31
|
+
return self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
32
32
|
|
33
|
-
def move_back(self, linear: float) ->
|
33
|
+
def move_back(self, linear: float) -> bytes:
|
34
34
|
"""Move back. values 0.0 1.0."""
|
35
35
|
linear_percent = get_percent(abs(linear * 100))
|
36
36
|
(linear_speed, angular_speed) = transform_both_speeds(270.0, 0.0, linear_percent, 0.0)
|
37
|
-
self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
37
|
+
return self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
38
38
|
|
39
|
-
def move_left(self, angular: float) ->
|
39
|
+
def move_left(self, angular: float) -> bytes:
|
40
40
|
"""Move forward. values 0.0 1.0."""
|
41
41
|
angular_percent = get_percent(abs(angular * 100))
|
42
42
|
(linear_speed, angular_speed) = transform_both_speeds(0.0, 0.0, 0.0, angular_percent)
|
43
|
-
self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
43
|
+
return self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
44
44
|
|
45
|
-
def move_right(self, angular: float) ->
|
45
|
+
def move_right(self, angular: float) -> bytes:
|
46
46
|
"""Move back. values 0.0 1.0."""
|
47
47
|
angular_percent = get_percent(abs(angular * 100))
|
48
48
|
(linear_speed, angular_speed) = transform_both_speeds(0.0, 180.0, 0.0, angular_percent)
|
49
|
-
self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
49
|
+
return self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
|
@@ -28,7 +28,7 @@ pymammotion/data/model/enums.py,sha256=EpKmO8yVUZyEnTY4yH0DMMVKYNQM42zpW1maUu0i3
|
|
28
28
|
pymammotion/data/model/excute_boarder_params.py,sha256=9CpUqrygcle1C_1hDW-riLmm4map4ZbE842NXjcomEI,1394
|
29
29
|
pymammotion/data/model/execute_boarder.py,sha256=9rd_h4fbcsXxgnLOd2rO2hWyD1abnTGc47QTEpp8DD0,1103
|
30
30
|
pymammotion/data/model/generate_route_information.py,sha256=MkUBoqGtCAKmiVQ4Q1pEoDVHZs5uLIo7vhfWT4nGbtY,801
|
31
|
-
pymammotion/data/model/hash_list.py,sha256=
|
31
|
+
pymammotion/data/model/hash_list.py,sha256=Tj4yYOr4jlOj5oU1rw-ypUNsx3Q76QCwM6M_PZrAgaI,3463
|
32
32
|
pymammotion/data/model/location.py,sha256=PwmITejfI4pm7PI4rzqSuuHetwle6IJr_CV95435s2M,871
|
33
33
|
pymammotion/data/model/mowing_modes.py,sha256=5TrHSijUyPtIDWpNtgzx_vFQukRJWRz4gIrUaXggKPw,827
|
34
34
|
pymammotion/data/model/plan.py,sha256=mcadkSL7fQXy0iJ0q786I3GEQY4i6kmQXfW6Ri69lcQ,2906
|
@@ -48,7 +48,7 @@ pymammotion/http/model/http.py,sha256=1NJP4hkBulcnpbD7Rcwltd8Ry9lnZzQVFJN8Oo7MKe
|
|
48
48
|
pymammotion/mammotion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
pymammotion/mammotion/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
50
|
pymammotion/mammotion/commands/abstract_message.py,sha256=nw6r7694yzl7iJKqRqhLmAPRjd_TL_Xo_-JXq2_a_ug,222
|
51
|
-
pymammotion/mammotion/commands/mammotion_command.py,sha256=
|
51
|
+
pymammotion/mammotion/commands/mammotion_command.py,sha256=Cdv8sAt-W-Sihmhir1eN56OMA2e5b8y47NP2QKYqb-o,2419
|
52
52
|
pymammotion/mammotion/commands/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
pymammotion/mammotion/commands/messages/driver.py,sha256=ANIOEtjF23k7W_R_Yfgzxmc7p1KSBCF-l-tijUtw0Yg,3709
|
54
54
|
pymammotion/mammotion/commands/messages/media.py,sha256=ps0l06CXy5Ej--gTNCsyKttwo7yHLVrJUpn-wNJYecs,1150
|
@@ -118,7 +118,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
|
|
118
118
|
pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
|
119
119
|
pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
|
120
120
|
pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
|
121
|
-
pymammotion-0.2.
|
122
|
-
pymammotion-0.2.
|
123
|
-
pymammotion-0.2.
|
124
|
-
pymammotion-0.2.
|
121
|
+
pymammotion-0.2.47.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
122
|
+
pymammotion-0.2.47.dist-info/METADATA,sha256=bNQeK12Z3_33er6aQINFxdnR5vdbKoD35Jqg612MCrI,4052
|
123
|
+
pymammotion-0.2.47.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
124
|
+
pymammotion-0.2.47.dist-info/RECORD,,
|
File without changes
|
File without changes
|