pymammotion 0.2.52__py3-none-any.whl → 0.2.53__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 -5
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.53.dist-info}/METADATA +1 -1
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.53.dist-info}/RECORD +6 -6
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.53.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.52.dist-info → pymammotion-0.2.53.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)
|
@@ -45,16 +45,15 @@ class MammotionMixedDeviceManager:
|
|
45
45
|
mqtt: MammotionCloud | None = None,
|
46
46
|
preference: ConnectionPreference = ConnectionPreference.BLUETOOTH,
|
47
47
|
) -> None:
|
48
|
-
self._mower_state = None
|
49
48
|
self.name = name
|
50
|
-
self.
|
49
|
+
self._mower_state = MowingDevice()
|
51
50
|
self.add_ble(ble_device)
|
52
51
|
self.add_cloud(cloud_device, mqtt)
|
53
52
|
self.preference = preference
|
54
53
|
|
55
54
|
@property
|
56
55
|
def mower_state(self):
|
57
|
-
return self.
|
56
|
+
return self._mower_state
|
58
57
|
|
59
58
|
@mower_state.setter
|
60
59
|
def mower_state(self, value: MowingDevice) -> None:
|
@@ -62,7 +61,7 @@ class MammotionMixedDeviceManager:
|
|
62
61
|
self._cloud_device.state_manager.set_device(value)
|
63
62
|
if self._ble_device:
|
64
63
|
self._ble_device.state_manager.set_device(value)
|
65
|
-
self.
|
64
|
+
self._mower_state = value
|
66
65
|
|
67
66
|
def ble(self) -> MammotionBaseBLEDevice | None:
|
68
67
|
return self._ble_device
|
@@ -70,6 +69,12 @@ class MammotionMixedDeviceManager:
|
|
70
69
|
def cloud(self) -> MammotionBaseCloudDevice | None:
|
71
70
|
return self._cloud_device
|
72
71
|
|
72
|
+
def has_queued_commands(self) -> bool:
|
73
|
+
if self.has_cloud() and self.preference == ConnectionPreference.WIFI:
|
74
|
+
return not self.cloud()._mqtt.command_queue.empty()
|
75
|
+
else:
|
76
|
+
return False
|
77
|
+
|
73
78
|
def add_ble(self, ble_device: BLEDevice) -> None:
|
74
79
|
if ble_device is not None:
|
75
80
|
self._ble_device = MammotionBaseBLEDevice(self.mower_state, ble_device)
|
@@ -145,7 +150,6 @@ async def create_devices(
|
|
145
150
|
return mammotion
|
146
151
|
|
147
152
|
|
148
|
-
@cache
|
149
153
|
class Mammotion:
|
150
154
|
"""Represents a Mammotion account and its devices."""
|
151
155
|
|
@@ -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=7H0SNO4GTCnrthJ6wL1pkVajqb74t006k4lzLr-_cZE,12500
|
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.53.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
122
|
+
pymammotion-0.2.53.dist-info/METADATA,sha256=sDDhMB3l16nIsK86dpKvlH9eSq1X5E8cXMc0rhF2KtA,4052
|
123
|
+
pymammotion-0.2.53.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
124
|
+
pymammotion-0.2.53.dist-info/RECORD,,
|
File without changes
|
File without changes
|