pymammotion 0.2.52__py3-none-any.whl → 0.2.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.
- pymammotion/data/model/hash_list.py +0 -2
- pymammotion/mammotion/devices/mammotion.py +9 -6
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.54.dist-info}/METADATA +2 -5
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.54.dist-info}/RECORD +6 -6
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.54.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.54.dist-info}/WHEEL +0 -0
@@ -82,12 +82,10 @@ class HashList(DataClassORJSONMixin):
|
|
82
82
|
if obj.current_frame == hash_list.current_frame:
|
83
83
|
# Replace the item if current_frame matches
|
84
84
|
self.root_hash_list.data[index] = hash_list
|
85
|
-
self.update_hash_lists(self.hashlist)
|
86
85
|
return
|
87
86
|
|
88
87
|
# If no match was found, append the new item
|
89
88
|
self.root_hash_list.data.append(hash_list)
|
90
|
-
self.update_hash_lists(self.hashlist)
|
91
89
|
|
92
90
|
def missing_hash_frame(self):
|
93
91
|
return self._find_missing_frames(self.root_hash_list)
|
@@ -5,7 +5,6 @@ from __future__ import annotations
|
|
5
5
|
import asyncio
|
6
6
|
import logging
|
7
7
|
from enum import Enum
|
8
|
-
from functools import cache
|
9
8
|
from typing import Any
|
10
9
|
|
11
10
|
from bleak.backends.device import BLEDevice
|
@@ -45,16 +44,15 @@ class MammotionMixedDeviceManager:
|
|
45
44
|
mqtt: MammotionCloud | None = None,
|
46
45
|
preference: ConnectionPreference = ConnectionPreference.BLUETOOTH,
|
47
46
|
) -> None:
|
48
|
-
self._mower_state = None
|
49
47
|
self.name = name
|
50
|
-
self.
|
48
|
+
self._mower_state = MowingDevice()
|
51
49
|
self.add_ble(ble_device)
|
52
50
|
self.add_cloud(cloud_device, mqtt)
|
53
51
|
self.preference = preference
|
54
52
|
|
55
53
|
@property
|
56
54
|
def mower_state(self):
|
57
|
-
return self.
|
55
|
+
return self._mower_state
|
58
56
|
|
59
57
|
@mower_state.setter
|
60
58
|
def mower_state(self, value: MowingDevice) -> None:
|
@@ -62,7 +60,7 @@ class MammotionMixedDeviceManager:
|
|
62
60
|
self._cloud_device.state_manager.set_device(value)
|
63
61
|
if self._ble_device:
|
64
62
|
self._ble_device.state_manager.set_device(value)
|
65
|
-
self.
|
63
|
+
self._mower_state = value
|
66
64
|
|
67
65
|
def ble(self) -> MammotionBaseBLEDevice | None:
|
68
66
|
return self._ble_device
|
@@ -70,6 +68,12 @@ class MammotionMixedDeviceManager:
|
|
70
68
|
def cloud(self) -> MammotionBaseCloudDevice | None:
|
71
69
|
return self._cloud_device
|
72
70
|
|
71
|
+
def has_queued_commands(self) -> bool:
|
72
|
+
if self.has_cloud() and self.preference == ConnectionPreference.WIFI:
|
73
|
+
return not self.cloud()._mqtt.command_queue.empty()
|
74
|
+
else:
|
75
|
+
return False
|
76
|
+
|
73
77
|
def add_ble(self, ble_device: BLEDevice) -> None:
|
74
78
|
if ble_device is not None:
|
75
79
|
self._ble_device = MammotionBaseBLEDevice(self.mower_state, ble_device)
|
@@ -145,7 +149,6 @@ async def create_devices(
|
|
145
149
|
return mammotion
|
146
150
|
|
147
151
|
|
148
|
-
@cache
|
149
152
|
class Mammotion:
|
150
153
|
"""Represents a Mammotion account and its devices."""
|
151
154
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pymammotion
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.54
|
4
4
|
Summary:
|
5
5
|
License: GNU-3.0
|
6
6
|
Author: Michael Arthur
|
@@ -18,20 +18,17 @@ Requires-Dist: alicloud-gateway-iot (>=1.0.0,<2.0.0)
|
|
18
18
|
Requires-Dist: aliyun-iot-linkkit (>=1.2.12,<2.0.0)
|
19
19
|
Requires-Dist: aliyun-python-sdk-iot (>=8.57.0,<9.0.0)
|
20
20
|
Requires-Dist: async-timeout (>=4.0.3,<5.0.0)
|
21
|
-
Requires-Dist: autotyping (>=24.3.0,<25.0.0)
|
22
21
|
Requires-Dist: betterproto (>=1.2.5,<2.0.0)
|
23
22
|
Requires-Dist: bleak (>=0.21.0)
|
24
23
|
Requires-Dist: bleak-retry-connector (>=3.5.0,<4.0.0)
|
25
24
|
Requires-Dist: jsonic (>=1.0.0,<2.0.0)
|
26
25
|
Requires-Dist: mashumaro (>=3.13,<4.0)
|
27
|
-
Requires-Dist: mypy (>=1.11.2,<2.0.0)
|
28
26
|
Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
|
29
|
-
Requires-Dist: numpy (>=1.26.
|
27
|
+
Requires-Dist: numpy (>=1.26.4,<2.0.0)
|
30
28
|
Requires-Dist: orjson (>=3.9.15,<4.0.0)
|
31
29
|
Requires-Dist: paho-mqtt (>=1.6.1,<2.0.0)
|
32
30
|
Requires-Dist: protobuf (>=4.23.1)
|
33
31
|
Requires-Dist: py-jsonic (>=0.0.2,<0.0.3)
|
34
|
-
Requires-Dist: pyjoystick (>=1.2.4,<2.0.0)
|
35
32
|
Description-Content-Type: text/markdown
|
36
33
|
|
37
34
|
# PyMammotion - Python API for Mammotion Mowers [](https://discord.gg/vpZdWhJX8x)
|
@@ -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=v9zoOhrwr1TMTsyPL-BQSylbqfapmO4l5oIefaW9YHw,5183
|
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
|
@@ -61,7 +61,7 @@ pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
61
61
|
pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3TTad9wHIPsU9s,5640
|
62
62
|
pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
|
63
63
|
pymammotion/mammotion/devices/base.py,sha256=MXAuJ9sGnf9QqBeNxGbOkdtqwVpPocVdxw0uT0DgSks,9800
|
64
|
-
pymammotion/mammotion/devices/mammotion.py,sha256=
|
64
|
+
pymammotion/mammotion/devices/mammotion.py,sha256=OFLrxstDnOtfq1ikC-HF8MaWy5h3Wjmlw-hvHRmAZdc,12472
|
65
65
|
pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=nyO7pkKgAoRPs-28ESf6ee-y3G5JTYRO-MCp4wKPMlE,17476
|
66
66
|
pymammotion/mammotion/devices/mammotion_cloud.py,sha256=VuXuYlvi-HRbfRlgIV3KraVtbu2EM3QxP-JWWAYj_E0,11774
|
67
67
|
pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
|
@@ -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.54.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
122
|
+
pymammotion-0.2.54.dist-info/METADATA,sha256=j0TL-HVDtfRxxrsPXUDv5mofUmhqXbUFUO7FTxv_9RI,3926
|
123
|
+
pymammotion-0.2.54.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
124
|
+
pymammotion-0.2.54.dist-info/RECORD,,
|
File without changes
|
File without changes
|