pymammotion 0.0.39__py3-none-any.whl → 0.0.41__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.
Potentially problematic release.
This version of pymammotion might be problematic. Click here for more details.
- pymammotion/__init__.py +4 -2
- pymammotion/aliyun/__init__.py +1 -0
- pymammotion/aliyun/cloud_gateway.py +74 -95
- pymammotion/aliyun/tmp_constant.py +2 -6
- pymammotion/bluetooth/ble.py +4 -12
- pymammotion/bluetooth/ble_message.py +12 -36
- pymammotion/bluetooth/data/convert.py +1 -3
- pymammotion/bluetooth/data/notifydata.py +0 -1
- pymammotion/data/model/device.py +62 -3
- pymammotion/data/model/hash_list.py +34 -14
- pymammotion/data/model/location.py +40 -0
- pymammotion/data/model/rapid_state.py +1 -5
- pymammotion/data/state_manager.py +84 -0
- pymammotion/event/event.py +18 -3
- pymammotion/http/http.py +2 -6
- pymammotion/mammotion/commands/mammotion_command.py +1 -3
- pymammotion/mammotion/commands/messages/driver.py +7 -21
- pymammotion/mammotion/commands/messages/media.py +4 -9
- pymammotion/mammotion/commands/messages/navigation.py +42 -107
- pymammotion/mammotion/commands/messages/network.py +10 -30
- pymammotion/mammotion/commands/messages/system.py +11 -26
- pymammotion/mammotion/commands/messages/video.py +1 -3
- pymammotion/mammotion/control/joystick.py +9 -33
- pymammotion/mammotion/devices/__init__.py +5 -1
- pymammotion/mammotion/devices/{luba.py → mammotion.py} +299 -110
- pymammotion/mqtt/__init__.py +5 -0
- pymammotion/mqtt/{mqtt.py → mammotion_mqtt.py} +46 -50
- pymammotion/proto/common_pb2.py +3 -3
- pymammotion/proto/dev_net_pb2.py +85 -85
- pymammotion/proto/luba_msg_pb2.py +11 -11
- pymammotion/proto/luba_mul_pb2.py +23 -23
- pymammotion/proto/mctrl_driver_pb2.py +23 -23
- pymammotion/proto/mctrl_nav_pb2.py +93 -93
- pymammotion/proto/mctrl_ota_pb2.py +13 -13
- pymammotion/proto/mctrl_pept_pb2.py +9 -9
- pymammotion/proto/mctrl_sys_pb2.py +119 -119
- pymammotion/utility/constant/device_constant.py +14 -0
- pymammotion/utility/datatype_converter.py +52 -9
- pymammotion/utility/device_type.py +129 -20
- pymammotion/utility/periodic.py +65 -0
- pymammotion/utility/rocker_util.py +63 -4
- {pymammotion-0.0.39.dist-info → pymammotion-0.0.41.dist-info}/METADATA +10 -4
- {pymammotion-0.0.39.dist-info → pymammotion-0.0.41.dist-info}/RECORD +45 -43
- {pymammotion-0.0.39.dist-info → pymammotion-0.0.41.dist-info}/WHEEL +1 -1
- pymammotion/luba/_init_.py +0 -0
- pymammotion/luba/base.py +0 -52
- {pymammotion-0.0.39.dist-info → pymammotion-0.0.41.dist-info}/LICENSE +0 -0
pymammotion/utility/periodic.py
CHANGED
|
@@ -10,12 +10,24 @@ class Periodic:
|
|
|
10
10
|
self._task = None
|
|
11
11
|
|
|
12
12
|
def start(self):
|
|
13
|
+
"""Start the task if it is not already started.
|
|
14
|
+
|
|
15
|
+
If the task is not already started, it sets the 'is_started' flag to
|
|
16
|
+
True and initiates a task to call a function periodically using asyncio.
|
|
17
|
+
"""
|
|
18
|
+
|
|
13
19
|
if not self.is_started:
|
|
14
20
|
self.is_started = True
|
|
15
21
|
# Start task to call func periodically:
|
|
16
22
|
self._task = asyncio.ensure_future(self._run())
|
|
17
23
|
|
|
18
24
|
async def stop(self):
|
|
25
|
+
"""Stop the task if it is currently running.
|
|
26
|
+
|
|
27
|
+
If the task is currently running, it will be cancelled and awaited until
|
|
28
|
+
it stops.
|
|
29
|
+
"""
|
|
30
|
+
|
|
19
31
|
if self.is_started:
|
|
20
32
|
self.is_started = False
|
|
21
33
|
# Stop task and await it stopped:
|
|
@@ -24,14 +36,67 @@ class Periodic:
|
|
|
24
36
|
await self._task
|
|
25
37
|
|
|
26
38
|
async def _run(self):
|
|
39
|
+
"""Run the specified function at regular intervals using asyncio.
|
|
40
|
+
|
|
41
|
+
This method runs the specified function at regular intervals based on
|
|
42
|
+
the time provided.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
self: The instance of the class.
|
|
46
|
+
|
|
47
|
+
"""
|
|
48
|
+
|
|
27
49
|
while True:
|
|
28
50
|
await asyncio.sleep(self.time)
|
|
29
51
|
await self.func()
|
|
30
52
|
|
|
31
53
|
|
|
32
54
|
def periodic(period):
|
|
55
|
+
"""Schedule a function to run periodically at a specified time interval.
|
|
56
|
+
|
|
57
|
+
This decorator function takes a period (in seconds) as input and returns
|
|
58
|
+
a scheduler function. The scheduler function, when applied as a
|
|
59
|
+
decorator to another function, will run the decorated function
|
|
60
|
+
periodically at the specified time interval.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
period (int): Time interval in seconds at which the decorated function should run
|
|
64
|
+
periodically.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
function: A scheduler function that can be used as a decorator to run a function
|
|
68
|
+
periodically.
|
|
69
|
+
|
|
70
|
+
"""
|
|
71
|
+
|
|
33
72
|
def scheduler(fcn):
|
|
73
|
+
"""Schedule the execution of a given async function periodically.
|
|
74
|
+
|
|
75
|
+
This function takes an async function as input and returns a new async
|
|
76
|
+
function that will execute the input function periodically at a
|
|
77
|
+
specified interval.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
fcn (function): The async function to be scheduled.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
function: An async function that will execute the input function periodically.
|
|
84
|
+
|
|
85
|
+
"""
|
|
86
|
+
|
|
34
87
|
async def wrapper(*args, **kwargs):
|
|
88
|
+
"""Execute the given function periodically using asyncio tasks.
|
|
89
|
+
|
|
90
|
+
This function continuously creates an asyncio task to execute the
|
|
91
|
+
provided function with the given arguments and keyword arguments. It
|
|
92
|
+
then waits for a specified period of time before creating the next task.
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
*args: Variable length argument list to be passed to the function.
|
|
96
|
+
**kwargs: Arbitrary keyword arguments to be passed to the function.
|
|
97
|
+
|
|
98
|
+
"""
|
|
99
|
+
|
|
35
100
|
while True:
|
|
36
101
|
asyncio.create_task(fcn(*args, **kwargs))
|
|
37
102
|
await asyncio.sleep(period)
|
|
@@ -16,13 +16,38 @@ class RockerControlUtil:
|
|
|
16
16
|
|
|
17
17
|
@classmethod
|
|
18
18
|
def getInstance(cls):
|
|
19
|
-
"""
|
|
19
|
+
"""Return the instance of RockerControlUtil if it exists, otherwise create
|
|
20
|
+
a new instance.
|
|
21
|
+
|
|
22
|
+
This method checks if an instance of RockerControlUtil exists. If not,
|
|
23
|
+
it creates a new instance and returns it.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
cls (class): The class for which the instance is being retrieved.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
RockerControlUtil: An instance of RockerControlUtil.
|
|
30
|
+
|
|
31
|
+
"""
|
|
20
32
|
if cls.instance_ == None:
|
|
21
33
|
cls.instance_ = RockerControlUtil()
|
|
22
34
|
return cls.instance_
|
|
23
35
|
|
|
24
36
|
def transfrom(self, f, f2):
|
|
25
|
-
"""
|
|
37
|
+
"""Perform a transformation based on the input angles and distance.
|
|
38
|
+
|
|
39
|
+
This method calculates the transformation based on the input angle 'f'
|
|
40
|
+
and distance 'f2'. It determines the appropriate radians based on the
|
|
41
|
+
angle and performs the transformation.
|
|
42
|
+
|
|
43
|
+
Args:
|
|
44
|
+
f (float): The angle in degrees for transformation.
|
|
45
|
+
f2 (float): The distance for transformation.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
list: A list containing the transformed coordinates.
|
|
49
|
+
|
|
50
|
+
"""
|
|
26
51
|
radians = 0.0
|
|
27
52
|
self.list_.clear()
|
|
28
53
|
i = self.thresholdValue_2
|
|
@@ -55,7 +80,24 @@ class RockerControlUtil:
|
|
|
55
80
|
return copy.copy(self.list_)
|
|
56
81
|
|
|
57
82
|
def transfrom2(self, f, f2):
|
|
58
|
-
"""
|
|
83
|
+
"""Calculate the transformation of input angles to radians and perform
|
|
84
|
+
trigonometric calculations.
|
|
85
|
+
|
|
86
|
+
This method takes two input parameters, an angle 'f' and a value 'f2',
|
|
87
|
+
and calculates the corresponding radians based on the angle. It then
|
|
88
|
+
performs trigonometric calculations using the radians and 'f2' value to
|
|
89
|
+
generate a list of transformed values.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
self: The instance of the class.
|
|
93
|
+
f (float): The input angle in degrees.
|
|
94
|
+
f2 (float): The input value for trigonometric calculations.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
list: A list containing the transformed values based on trigonometric
|
|
98
|
+
calculations.
|
|
99
|
+
|
|
100
|
+
"""
|
|
59
101
|
radians = 0.0
|
|
60
102
|
self.list_.clear()
|
|
61
103
|
i = self.thresholdValue_2
|
|
@@ -97,7 +139,24 @@ class RockerControlUtil:
|
|
|
97
139
|
return copy.copy(self.list_)
|
|
98
140
|
|
|
99
141
|
def transfrom3(self, f, f2):
|
|
100
|
-
"""
|
|
142
|
+
"""Calculate the transformation of input angles to radians and perform
|
|
143
|
+
trigonometric calculations.
|
|
144
|
+
|
|
145
|
+
This method calculates the transformation of input angles to radians
|
|
146
|
+
based on certain threshold values. It then performs trigonometric
|
|
147
|
+
calculations using sine and cosine functions to determine the output
|
|
148
|
+
values.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
self: The object instance.
|
|
152
|
+
f (float): The input angle in degrees.
|
|
153
|
+
f2 (float): The input value for trigonometric calculations.
|
|
154
|
+
|
|
155
|
+
Returns:
|
|
156
|
+
list: A list containing the calculated values based on trigonometric
|
|
157
|
+
functions.
|
|
158
|
+
|
|
159
|
+
"""
|
|
101
160
|
radians = 0.0
|
|
102
161
|
self.list_.clear()
|
|
103
162
|
i = self.thresholdValue_2
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pymammotion
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.41
|
|
4
4
|
Summary:
|
|
5
5
|
License: GNU-3.0
|
|
6
6
|
Author: Michael Arthur
|
|
7
7
|
Author-email: michael@jumblesoft.co.nz
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.12.0,<3.13.0
|
|
9
9
|
Classifier: License :: Other/Proprietary License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
12
|
Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
|
|
14
13
|
Requires-Dist: alibabacloud-apigateway-util (>=0.0.2,<0.0.3)
|
|
@@ -27,6 +26,7 @@ Requires-Dist: paho-mqtt (>=1.6.1,<2.0.0)
|
|
|
27
26
|
Requires-Dist: protobuf (>=4.23.1)
|
|
28
27
|
Requires-Dist: py-jsonic (>=0.0.2,<0.0.3)
|
|
29
28
|
Requires-Dist: pyjoystick (>=1.2.4,<2.0.0)
|
|
29
|
+
Requires-Dist: pyproj (>=3.6.1,<4.0.0)
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
32
32
|
# PyMammotion - Python API for Mammotion Mowers [](https://discord.gg/vpZdWhJX8x)
|
|
@@ -35,7 +35,7 @@ Description-Content-Type: text/markdown
|
|
|
35
35
|
[![PyPI Releases][img_pypi]][url_pypi]
|
|
36
36
|
[![Supported Python Versions][img_pyversions]][url_pyversions]
|
|
37
37
|
|
|
38
|
-
[img_version]: https://img.shields.io/static/v1.svg?label=SemVer&message=0.0
|
|
38
|
+
[img_version]: https://img.shields.io/static/v1.svg?label=SemVer&message=0.4.0&color=blue
|
|
39
39
|
[url_version]: https://pypi.org/project/pymammotion/
|
|
40
40
|
|
|
41
41
|
[img_pypi]: https://img.shields.io/badge/PyPI-wheels-green.svg
|
|
@@ -90,3 +90,9 @@ If you encounter any issues:
|
|
|
90
90
|
|
|
91
91
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
92
92
|
|
|
93
|
+
|
|
94
|
+
## Trademark Notice
|
|
95
|
+
|
|
96
|
+
The trademarks "Mammotion," "Luba," and "Yuka" referenced herein are registered trademarks of their respective owners. The author of this software repository is not affiliated with, endorsed by, or connected to these trademark owners in any way.
|
|
97
|
+
|
|
98
|
+
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
pymammotion/__init__.py,sha256=
|
|
2
|
-
pymammotion/aliyun/
|
|
1
|
+
pymammotion/__init__.py,sha256=4IPNlcivNtnipKurk9T7gI0G7dTxhnceptnKy4HQWbw,1412
|
|
2
|
+
pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
|
|
3
|
+
pymammotion/aliyun/cloud_gateway.py,sha256=3j6y4yrN0Gf0T-jbultLqQeEEihdkjn3uSdUodQ30Dw,18295
|
|
3
4
|
pymammotion/aliyun/cloud_service.py,sha256=YWcKuKK6iRWy5mTnBYgHxcCusiRGGzQt3spSf7dGDss,2183
|
|
4
5
|
pymammotion/aliyun/dataclass/aep_response.py,sha256=EPuTU8uN0vkbPY_8MdBKAxASSBI9r021kODeOqrcdtw,353
|
|
5
6
|
pymammotion/aliyun/dataclass/connect_response.py,sha256=Yz-fEbDzgGPTo5Of2oAjmFkSv08T7ze80pQU4k-gKIU,824
|
|
@@ -7,100 +8,101 @@ pymammotion/aliyun/dataclass/dev_by_account_response.py,sha256=I3ZQEfF_223dw7yvv
|
|
|
7
8
|
pymammotion/aliyun/dataclass/login_by_oauth_response.py,sha256=6TQYAMyQ1jf_trsnTST007qlNXve3BqsvpV0Dwp7CFA,1245
|
|
8
9
|
pymammotion/aliyun/dataclass/regions_response.py,sha256=0Kcly3OPMIEGK36O0OGFvZrHl6nJfnKzNeC4RPXvFhU,591
|
|
9
10
|
pymammotion/aliyun/dataclass/session_by_authcode_response.py,sha256=wLGSX2nHkA7crmyYeE_dYly_lDtoYWAiIZjQ0C6m44o,358
|
|
10
|
-
pymammotion/aliyun/tmp_constant.py,sha256=
|
|
11
|
+
pymammotion/aliyun/tmp_constant.py,sha256=M4Hq_lrGB3LZdX6R2XohRPFoK1NDnNV-pTJwJcJ9838,6650
|
|
11
12
|
pymammotion/bluetooth/__init__.py,sha256=LAl8jqZ1fPh-3mLmViNQsP3s814C1vsocYUa6oSaXt0,36
|
|
12
|
-
pymammotion/bluetooth/ble.py,sha256=
|
|
13
|
-
pymammotion/bluetooth/ble_message.py,sha256=
|
|
13
|
+
pymammotion/bluetooth/ble.py,sha256=9fA8yw5xXNJRSbC68SdOMf2QJnHoD7RhhCjLFoF0c0I,2404
|
|
14
|
+
pymammotion/bluetooth/ble_message.py,sha256=75jaOgUiPoCt33c9OLyCpfN9Pp1QfINTUAFZVF3zoM8,15487
|
|
14
15
|
pymammotion/bluetooth/const.py,sha256=CCqyHsYbB0BAYjwdhXt_n6eWWxmhlUrAFjvVv57mbvE,1749
|
|
15
16
|
pymammotion/bluetooth/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
pymammotion/bluetooth/data/convert.py,sha256=
|
|
17
|
+
pymammotion/bluetooth/data/convert.py,sha256=tlctvRODoYypy4FpMD_UBwB1bIn5hG0QdQQdNI0e1R8,792
|
|
17
18
|
pymammotion/bluetooth/data/framectrldata.py,sha256=-qRmbHBXDLDEPOp-N9e44C9l3SUcJX7vyEvACx5DpDA,987
|
|
18
|
-
pymammotion/bluetooth/data/notifydata.py,sha256=
|
|
19
|
+
pymammotion/bluetooth/data/notifydata.py,sha256=N1bphpueWUWbsWUcpZmMGt2CyCgLcKAFAIHG4RCnqBU,1947
|
|
19
20
|
pymammotion/const.py,sha256=3plR6t5sFVhx3LoUbW5PE2gqIANoD-fSm-T0q8uIwIU,336
|
|
20
21
|
pymammotion/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
22
|
pymammotion/data/model/__init__.py,sha256=d8FlIgCcWqoH3jJSpnm-IY-25RM-l2nbRwLtWjSHo74,222
|
|
22
|
-
pymammotion/data/model/device.py,sha256=
|
|
23
|
+
pymammotion/data/model/device.py,sha256=SoxmvxK3It5IKLiOybExQCIQo2WHCthsMaQdeRpCmuA,7325
|
|
23
24
|
pymammotion/data/model/enums.py,sha256=tD_vYsxstOV_lUkYF9uWkrjVOgAJPNnGevy_xmiu3WE,1558
|
|
24
25
|
pymammotion/data/model/excute_boarder_params.py,sha256=kadSth4y-VXlXIZ6R-Ng-kDvBbM-3YRr8bmR86qR0U0,1355
|
|
25
26
|
pymammotion/data/model/execute_boarder.py,sha256=oDb2h5tFtOQIa8OCNYaDugqCgCZBLjQRzQTNVcJVAGQ,1072
|
|
26
27
|
pymammotion/data/model/generate_route_information.py,sha256=5w1MM1-gXGXb_AoEap_I5xTxAFbNSzXuqQFEkw4NmDs,4301
|
|
27
|
-
pymammotion/data/model/hash_list.py,sha256=
|
|
28
|
+
pymammotion/data/model/hash_list.py,sha256=sVSJ9-z_j8MMia4TQLAJbAdvtyd_eamLgkgVhOTqZJg,1212
|
|
29
|
+
pymammotion/data/model/location.py,sha256=ST0SrKnutQ1VsesOiKAmEqpc3LomW5waKZbFdzUg9OQ,670
|
|
28
30
|
pymammotion/data/model/mowing_modes.py,sha256=rURsywZPDdE3fc3ch_XEgEL6bUOaoS3oIGoHMhh6PFM,473
|
|
29
31
|
pymammotion/data/model/plan.py,sha256=7JvqAo0a9Yg1Vtifd4J3Dx3StEppxrMOfmq2-877kYg,2891
|
|
30
|
-
pymammotion/data/model/rapid_state.py,sha256=
|
|
32
|
+
pymammotion/data/model/rapid_state.py,sha256=_e9M-65AbkvIqXyMYzLKBxbNvpso42qD8R-JSt66THY,986
|
|
31
33
|
pymammotion/data/model/region_data.py,sha256=75xOTM1qeRbSROp53eIczw3yCmYM9DgMjMh8qE9xkKo,2880
|
|
32
34
|
pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
33
35
|
pymammotion/data/mqtt/event.py,sha256=kEilMLmwZG2nbokLw7X28KF3b-te8G-MfNARYm4LG6I,2170
|
|
34
36
|
pymammotion/data/mqtt/properties.py,sha256=HkBPghr26L9_b4QaOi1DtPgb0UoPIOGSe9wb3kgnM6Y,2815
|
|
35
37
|
pymammotion/data/mqtt/status.py,sha256=zqnlo-MzejEQZszl0i0Wucoc3E76x6UtI9JLxoBnu54,1067
|
|
38
|
+
pymammotion/data/state_manager.py,sha256=r1W1hCXRdOAmgb5Oi83WuISw7-H5ACV_-GjAoO4-KK4,2662
|
|
36
39
|
pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
|
|
37
|
-
pymammotion/event/event.py,sha256=
|
|
40
|
+
pymammotion/event/event.py,sha256=Fy5-I1p92AO_D67VW4eHQqA4pOt7MZsrP--tVfIVUz8,1820
|
|
38
41
|
pymammotion/http/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
-
pymammotion/http/http.py,sha256=
|
|
40
|
-
pymammotion/luba/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
|
-
pymammotion/luba/base.py,sha256=v7DSTuJAgvSB4YC68SIfhR-iOTjm723dzfQqODB0mMo,1891
|
|
42
|
+
pymammotion/http/http.py,sha256=t9jO1U3Kjy30TzHkzQViv5BtmCKnNfyxrurAvXSghok,2284
|
|
42
43
|
pymammotion/mammotion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
44
|
pymammotion/mammotion/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
45
|
pymammotion/mammotion/commands/abstract_message.py,sha256=8m_z6iK67svgmaTG6a_BEj4pVV00JWiIoXLg4njfPZQ,145
|
|
45
|
-
pymammotion/mammotion/commands/mammotion_command.py,sha256=
|
|
46
|
+
pymammotion/mammotion/commands/mammotion_command.py,sha256=kAk6ZVTfb6c7MmLAOCxG8wP2UlPooL04FBT1P0JaTfU,1275
|
|
46
47
|
pymammotion/mammotion/commands/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
|
-
pymammotion/mammotion/commands/messages/driver.py,sha256=
|
|
48
|
-
pymammotion/mammotion/commands/messages/media.py,sha256=
|
|
49
|
-
pymammotion/mammotion/commands/messages/navigation.py,sha256=
|
|
50
|
-
pymammotion/mammotion/commands/messages/network.py,sha256=
|
|
48
|
+
pymammotion/mammotion/commands/messages/driver.py,sha256=IFtmp9gJ3p3U2xtTgWVpKBMbnVnUht6Ioih17po6Hr4,3783
|
|
49
|
+
pymammotion/mammotion/commands/messages/media.py,sha256=ps0l06CXy5Ej--gTNCsyKttwo7yHLVrJUpn-wNJYecs,1150
|
|
50
|
+
pymammotion/mammotion/commands/messages/navigation.py,sha256=krd7fY1uqeOzkvZTtbnUC4dNi938KgdBbCN6pad13Sw,21692
|
|
51
|
+
pymammotion/mammotion/commands/messages/network.py,sha256=1a0BIhaBhBuhqYaK5EUqLbDgfzjzsIGrXS32wMKtxOU,8316
|
|
51
52
|
pymammotion/mammotion/commands/messages/ota.py,sha256=XkeuWBZtpYMMBze6r8UN7dJXbe2FxUNGNnjwBpXJKM0,1240
|
|
52
|
-
pymammotion/mammotion/commands/messages/system.py,sha256=
|
|
53
|
-
pymammotion/mammotion/commands/messages/video.py,sha256=
|
|
53
|
+
pymammotion/mammotion/commands/messages/system.py,sha256=qP6DwYPKTaRgqLZG4Ot8BLD2uzKxhLpCKYFIwek131k,10963
|
|
54
|
+
pymammotion/mammotion/commands/messages/video.py,sha256=_8lJsU4sLm2CGnc7RDkueA0A51Ysui6x7SqFnhX8O2g,1007
|
|
54
55
|
pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
|
-
pymammotion/mammotion/control/joystick.py,sha256=
|
|
56
|
-
pymammotion/mammotion/devices/__init__.py,sha256=
|
|
57
|
-
pymammotion/mammotion/devices/
|
|
58
|
-
pymammotion/mqtt/
|
|
56
|
+
pymammotion/mammotion/control/joystick.py,sha256=EWV20MMzQuhbLlNlXbsyZKSEpeM7x1CQL7saU4Pn0-g,6165
|
|
57
|
+
pymammotion/mammotion/devices/__init__.py,sha256=T72jt0ejtMjo1rPmn_FeMF3pmp0LLeRRpc9WcDKEYYY,126
|
|
58
|
+
pymammotion/mammotion/devices/mammotion.py,sha256=essMQmKfmQsBdEoxHrfk5BJshnKX6Ev48e-JQTbgrBA,29130
|
|
59
|
+
pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
|
|
60
|
+
pymammotion/mqtt/mammotion_mqtt.py,sha256=EBnUwqah-mZNcAn5Hq2sV3NKXueIYWNhYPiaXwaXdHg,9084
|
|
59
61
|
pymammotion/proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
62
|
pymammotion/proto/common.proto,sha256=op8TCU1ppCMeP-izK2tXMoJXQyZXdgj1EgOKcd14A-A,81
|
|
61
63
|
pymammotion/proto/common.py,sha256=stFYSHAjVKasFfPacxLcMfpGuUtGYkTb8RUAoJEtaRc,324
|
|
62
|
-
pymammotion/proto/common_pb2.py,sha256=
|
|
64
|
+
pymammotion/proto/common_pb2.py,sha256=8OpJ04lLq8sAktY6CkP8TxVGar9x858sCf6FqLy7Rs4,1030
|
|
63
65
|
pymammotion/proto/common_pb2.pyi,sha256=skF2ydSIQIvoobjiCUjXVD-pTfJiAILbaUl6nkdh2SY,460
|
|
64
66
|
pymammotion/proto/dev_net.proto,sha256=4c1vcKvxYQroDCr87j1_dTzDrmzuRlwHMXyGjvp3bAQ,5502
|
|
65
67
|
pymammotion/proto/dev_net.py,sha256=hQ2Do1qDPaSB6AoyTzILC4Xvr8hNWfqKuKGK3pUvShY,11256
|
|
66
|
-
pymammotion/proto/dev_net_pb2.py,sha256=
|
|
68
|
+
pymammotion/proto/dev_net_pb2.py,sha256=Kf7rTfwY921ye7ng29pxbSnsccNvxqN76QIVKYVhiNE,12868
|
|
67
69
|
pymammotion/proto/dev_net_pb2.pyi,sha256=svmD_B5zCw3Yg7ikrXvqube6Hg0a7YmGqsG_MbS9hsw,21825
|
|
68
70
|
pymammotion/proto/luba_msg.proto,sha256=Bo8LxUaaJ_bxu-WAnfA05wP0n_T6ozFdEibj7vFPrxs,1588
|
|
69
71
|
pymammotion/proto/luba_msg.py,sha256=YMhgv5S_1PlWGjWf332_lMcnTAlenMSm7_PnPQZqnlY,2371
|
|
70
|
-
pymammotion/proto/luba_msg_pb2.py,sha256=
|
|
72
|
+
pymammotion/proto/luba_msg_pb2.py,sha256=r9RXnPlbgFALKSeQJfosJ13dO7cwwC2YISf-HSgtbC8,4315
|
|
71
73
|
pymammotion/proto/luba_msg_pb2.pyi,sha256=La00OdR9XBAGFcXjhJ2WmUSR3CuI-W9WlOQnuGBXWGk,4066
|
|
72
74
|
pymammotion/proto/luba_mul.proto,sha256=YhzrsoILd14pM_MjuZLQIK08AoKMn_mYyL7CxZLp0-Q,1114
|
|
73
75
|
pymammotion/proto/luba_mul.py,sha256=M-26YJDIAQLYNAmXb3CRAjrxeOGezbJQwRcTEM-4TqI,2061
|
|
74
|
-
pymammotion/proto/luba_mul_pb2.py,sha256=
|
|
76
|
+
pymammotion/proto/luba_mul_pb2.py,sha256=nJ25xWmuBldTQsAddTR5EImTEN-D2FSUCd_5vBUUTwA,3399
|
|
75
77
|
pymammotion/proto/luba_mul_pb2.pyi,sha256=_ndK0hvvHtMOzsJ8rGSXZbp7fVEsiafycbYfWG1WPKo,3913
|
|
76
78
|
pymammotion/proto/mctrl_driver.proto,sha256=I0BncdAa3laeqT17Sn95r_1HuBD3dSc9IVu9U3o0fU4,1385
|
|
77
79
|
pymammotion/proto/mctrl_driver.py,sha256=sseY2MxUtaQZvg7fvbA_gNvtqx9MVDW_rvUcfA2CWVs,2971
|
|
78
|
-
pymammotion/proto/mctrl_driver_pb2.py,sha256=
|
|
80
|
+
pymammotion/proto/mctrl_driver_pb2.py,sha256=bfLwZb5Hehb6OIkgFrZMkQ0oTBXoOBxpruszKz-UM1U,3785
|
|
79
81
|
pymammotion/proto/mctrl_driver_pb2.pyi,sha256=9_rcQELsSeOfeIQMTEFIpeXICpDe3arQeA4kAYWNSWw,5860
|
|
80
82
|
pymammotion/proto/mctrl_nav.proto,sha256=gqUQIS8tg0RXTKz-4mLXLcJSVcXtj6Wn2Zl017vTmzs,10535
|
|
81
83
|
pymammotion/proto/mctrl_nav.py,sha256=6qgOxdofwPNErVGg4IYENNeyZcjZtl6MvDXGC5Jwq58,22292
|
|
82
|
-
pymammotion/proto/mctrl_nav_pb2.py,sha256=
|
|
84
|
+
pymammotion/proto/mctrl_nav_pb2.py,sha256=1oQUb9Xp2piNbJ2QRVlhXwsDTWbL7lcoD7vTIl3HzaI,21753
|
|
83
85
|
pymammotion/proto/mctrl_nav_pb2.pyi,sha256=eWevslsUGBX974w8XbqQqnHMmZoruw1sWwonOugETm8,45956
|
|
84
86
|
pymammotion/proto/mctrl_ota.proto,sha256=4iHr-v1R0QiNndCnv3b6mhXiERLukB67ZzhTgt1iMc0,629
|
|
85
87
|
pymammotion/proto/mctrl_ota.py,sha256=nIJgTWXemRuE622XqCym6TFHugV3PzAzX5IOTlE3muM,1427
|
|
86
|
-
pymammotion/proto/mctrl_ota_pb2.py,sha256
|
|
88
|
+
pymammotion/proto/mctrl_ota_pb2.py,sha256=-atzWg8USf4DMhlEL39q83paIyAO-CzsZhQjHvV4H68,2271
|
|
87
89
|
pymammotion/proto/mctrl_ota_pb2.pyi,sha256=hFAQh5FOT8XbtTylYXQk9wCHH4Xn5C6MbW8bRgZPjt8,2821
|
|
88
90
|
pymammotion/proto/mctrl_pept.proto,sha256=HBTRiP1XJB5w9hT1V38aePPREpePBk5jkjupu_kskuQ,664
|
|
89
91
|
pymammotion/proto/mctrl_pept.py,sha256=utMtbXsCwGS14YggTqUdVIbTZsR0w49B6gKU8jHzbJg,1332
|
|
90
|
-
pymammotion/proto/mctrl_pept_pb2.py,sha256=
|
|
92
|
+
pymammotion/proto/mctrl_pept_pb2.py,sha256=QqQ1BXo_EBs7cLmQGtRbnNy0rRxvaqtrGfKxXS8R5A8,2134
|
|
91
93
|
pymammotion/proto/mctrl_pept_pb2.pyi,sha256=gr0lxUPqhyEnDdni9vpIQnAIhqAGtHlv1rFeb5EJnMY,2840
|
|
92
94
|
pymammotion/proto/mctrl_sys.proto,sha256=jx1NltF21skUn_x4vgE4Ksrw-5QvPTDtP2UOATVFEt4,10192
|
|
93
95
|
pymammotion/proto/mctrl_sys.py,sha256=ygf7QCA0Sn0rjvkj5SJystllcFvgYwT5zvt2F0hn7kg,19074
|
|
94
|
-
pymammotion/proto/mctrl_sys_pb2.py,sha256=
|
|
96
|
+
pymammotion/proto/mctrl_sys_pb2.py,sha256=fvVXdJtDCcmCGHjib53zkRV6WGqlD3bBs-YR_d8K5NY,21497
|
|
95
97
|
pymammotion/proto/mctrl_sys_pb2.pyi,sha256=2aojT3Q9kqP4YT9aOW0lt4RxRXfOdcsztbArHBG6RzQ,38902
|
|
96
98
|
pymammotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
99
|
pymammotion/utility/constant/__init__.py,sha256=tZz7szqIhrzNjfcLU3ysfINfg5VEBUAisd9AhP4mvT0,38
|
|
98
|
-
pymammotion/utility/constant/device_constant.py,sha256=
|
|
99
|
-
pymammotion/utility/datatype_converter.py,sha256=
|
|
100
|
-
pymammotion/utility/device_type.py,sha256=
|
|
101
|
-
pymammotion/utility/periodic.py,sha256=
|
|
102
|
-
pymammotion/utility/rocker_util.py,sha256=
|
|
103
|
-
pymammotion-0.0.
|
|
104
|
-
pymammotion-0.0.
|
|
105
|
-
pymammotion-0.0.
|
|
106
|
-
pymammotion-0.0.
|
|
100
|
+
pymammotion/utility/constant/device_constant.py,sha256=NgpzoS9v2KJjpgNJF09mGUOdFC8YBXO4yviWgIJfmIY,6773
|
|
101
|
+
pymammotion/utility/datatype_converter.py,sha256=v6zym2Zu0upxQjR-xDqXwi3516zpntSlg7LP8tQF5K8,4216
|
|
102
|
+
pymammotion/utility/device_type.py,sha256=B_Y1WCRPlFMDOqC13H0ltInyPkbPMIxCoZccCC13fmc,8154
|
|
103
|
+
pymammotion/utility/periodic.py,sha256=9wJMfwXPlx6Mbp3Fws7LLTI34ZDKphH1bva_Ggyk32g,3281
|
|
104
|
+
pymammotion/utility/rocker_util.py,sha256=syPL0QN4zMzHiTIkUKS7RXBBptjdbkfNlPddwUD5V3A,7171
|
|
105
|
+
pymammotion-0.0.41.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
106
|
+
pymammotion-0.0.41.dist-info/METADATA,sha256=l0nk0b1URsuCovCc-tp01KwU0mp89XPXv-KPuJkqj40,3825
|
|
107
|
+
pymammotion-0.0.41.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
108
|
+
pymammotion-0.0.41.dist-info/RECORD,,
|
pymammotion/luba/_init_.py
DELETED
|
File without changes
|
pymammotion/luba/base.py
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
from typing import Callable, Optional
|
|
2
|
-
|
|
3
|
-
from pymammotion.data.model.rapid_state import RapidState, RTKStatus
|
|
4
|
-
from pymammotion.data.mqtt.status import StatusType
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class BaseLuba:
|
|
8
|
-
def __init__(self):
|
|
9
|
-
self._rapid_state: Optional[RapidState] = None
|
|
10
|
-
self.on_pos_change: Optional[Callable[[float, float, float], None]] = None
|
|
11
|
-
self.on_rtk_change: Optional[Callable[[RTKStatus, float, int, int], None]] = (
|
|
12
|
-
None
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
self.on_warning: Optional[Callable[[int], None]] = None
|
|
16
|
-
|
|
17
|
-
self._status: Optional[StatusType] = None
|
|
18
|
-
self.on_status_change: Optional[Callable[[StatusType], None]] = None
|
|
19
|
-
|
|
20
|
-
def _set_rapid_state(self, state: RapidState):
|
|
21
|
-
old_state = self._rapid_state
|
|
22
|
-
self._rapid_state = state
|
|
23
|
-
if old_state:
|
|
24
|
-
if (
|
|
25
|
-
old_state.pos_x != state.pos_x
|
|
26
|
-
or old_state.pos_y != state.pos_y
|
|
27
|
-
or old_state.toward != state.toward
|
|
28
|
-
):
|
|
29
|
-
if self.on_pos_change:
|
|
30
|
-
self.on_pos_change(state.pos_x, state.pos_y, state.toward)
|
|
31
|
-
if (
|
|
32
|
-
old_state.rtk_status != state.rtk_status
|
|
33
|
-
or old_state.rtk_age != state.rtk_age
|
|
34
|
-
or old_state.satellites_total != state.satellites_total
|
|
35
|
-
or old_state.satellites_l2 != state.satellites_l2
|
|
36
|
-
):
|
|
37
|
-
if self.on_rtk_change:
|
|
38
|
-
self.on_rtk_change(
|
|
39
|
-
state.rtk_status,
|
|
40
|
-
state.rtk_age,
|
|
41
|
-
state.satellites_total,
|
|
42
|
-
state.satellites_l2,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
def _set_status(self, status: StatusType):
|
|
46
|
-
self._status = status
|
|
47
|
-
if self.on_status_change:
|
|
48
|
-
self.on_status_change(status)
|
|
49
|
-
|
|
50
|
-
@property
|
|
51
|
-
def status(self) -> Optional[StatusType]:
|
|
52
|
-
return self._status
|
|
File without changes
|