pymammotion 0.0.40__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.

Files changed (38) hide show
  1. pymammotion/__init__.py +4 -2
  2. pymammotion/aliyun/__init__.py +1 -0
  3. pymammotion/aliyun/cloud_gateway.py +74 -95
  4. pymammotion/aliyun/tmp_constant.py +2 -6
  5. pymammotion/bluetooth/ble.py +4 -12
  6. pymammotion/bluetooth/ble_message.py +12 -36
  7. pymammotion/bluetooth/data/convert.py +1 -3
  8. pymammotion/bluetooth/data/notifydata.py +0 -1
  9. pymammotion/data/model/device.py +62 -3
  10. pymammotion/data/model/hash_list.py +34 -14
  11. pymammotion/data/model/location.py +40 -0
  12. pymammotion/data/model/rapid_state.py +1 -5
  13. pymammotion/data/state_manager.py +84 -0
  14. pymammotion/event/event.py +18 -3
  15. pymammotion/http/http.py +2 -6
  16. pymammotion/mammotion/commands/mammotion_command.py +1 -3
  17. pymammotion/mammotion/commands/messages/driver.py +7 -21
  18. pymammotion/mammotion/commands/messages/media.py +4 -9
  19. pymammotion/mammotion/commands/messages/navigation.py +42 -107
  20. pymammotion/mammotion/commands/messages/network.py +10 -30
  21. pymammotion/mammotion/commands/messages/system.py +11 -26
  22. pymammotion/mammotion/commands/messages/video.py +1 -3
  23. pymammotion/mammotion/control/joystick.py +9 -33
  24. pymammotion/mammotion/devices/__init__.py +5 -1
  25. pymammotion/mammotion/devices/{luba.py → mammotion.py} +299 -110
  26. pymammotion/mqtt/__init__.py +5 -0
  27. pymammotion/mqtt/{mqtt.py → mammotion_mqtt.py} +46 -50
  28. pymammotion/utility/constant/device_constant.py +14 -0
  29. pymammotion/utility/datatype_converter.py +52 -9
  30. pymammotion/utility/device_type.py +129 -20
  31. pymammotion/utility/periodic.py +65 -0
  32. pymammotion/utility/rocker_util.py +63 -4
  33. {pymammotion-0.0.40.dist-info → pymammotion-0.0.41.dist-info}/METADATA +10 -4
  34. {pymammotion-0.0.40.dist-info → pymammotion-0.0.41.dist-info}/RECORD +36 -34
  35. {pymammotion-0.0.40.dist-info → pymammotion-0.0.41.dist-info}/WHEEL +1 -1
  36. pymammotion/luba/_init_.py +0 -0
  37. pymammotion/luba/base.py +0 -52
  38. {pymammotion-0.0.40.dist-info → pymammotion-0.0.41.dist-info}/LICENSE +0 -0
@@ -16,13 +16,38 @@ class RockerControlUtil:
16
16
 
17
17
  @classmethod
18
18
  def getInstance(cls):
19
- """Generated source for method getInstance"""
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
- """Generated source for method transfrom"""
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
- """Generated source for method transfrom2"""
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
- """Generated source for method transfrom3"""
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.40
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.11,<3.13
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 [![Discord](https://img.shields.io/discord/1247286396297678879)](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.1&color=blue
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=VtvA6zY9G7oildefhj4Ana595BPf_fh4u-Wi--Tya9s,1377
2
- pymammotion/aliyun/cloud_gateway.py,sha256=EIc790mBTlK_vqFsYmpXEutD0Oj2XcjrzLSf-ss298U,18765
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,55 +8,56 @@ 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=njE9jgXcoeoJAngAaqFDanME8INe7OMfSRd7TCKUTts,6682
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=_YEPtUZI8aZKXm12FuHll57Lb32Wv2di1FC29kT_wkI,2492
13
- pymammotion/bluetooth/ble_message.py,sha256=xT_-go0QC_ttEmmIxRuK6C4TLkkaafwB4ZfkMDe4HfQ,15791
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=IYjM5hK_tS5SkCaCCPdxb9WbkbBiMBs0CEb75ScXE4A,814
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=3oHFNIskR_HipNo_H4k4tOkNLQ4o6uUO7d2ldXFaAQU,1975
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=k2bljyszlIaUbQU01mOASIBfulNdCTP81Qeb7H6grq8,4684
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=IJwpzV3iVf21LUFukJU1DZc_UaFNjmakOPl_9wuJSI8,502
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=litO02jMGOIvgsT-P2g5wQeH0xibMUgvXmOXGlNK3FA,1034
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=kqtQaI8XWcx85Vl6f-VW8eYfaR3xlukkfwsxNsgdGDw,1409
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=0X04FJWioHpQiTK0nN3NOmoZtg9SptFXEjyRnuRDmEw,2328
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=AGt51tKPs_vVB_9CdT-4593cUJ1UPLAIRonkWyqVH8k,1281
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=zrif4bKvTE7P_IdSVyNREuxXasWmlHiRwVSQAPsjmJI,3953
48
- pymammotion/mammotion/commands/messages/media.py,sha256=E7oVMkymaRl7vSYoCelw5Hg8gwvcjJ5jtzmnM-wmKR0,1206
49
- pymammotion/mammotion/commands/messages/navigation.py,sha256=44L2gl8zSrnQmwvLD14-cKpU79opPlzHl3nKUdaHK6s,22422
50
- pymammotion/mammotion/commands/messages/network.py,sha256=ybuYxbEgS8SJiD_eFpqCRhKJuY9HD6-fseRRy9z_LsA,8576
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=rKlF-78uIMLVQPv6e9Fy-oXTUSK7-welJycIbN8D9qg,11113
53
- pymammotion/mammotion/commands/messages/video.py,sha256=ZgQbOjnB4IxNTZ7X_V8_cYN7fdJgGxAqOTx5VkufMoY,1029
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=0Ys-NuZK918H1EeLyYm6BzSl6lJlXDizTc4MYmnxVhk,6621
56
- pymammotion/mammotion/devices/__init__.py,sha256=GIYejBUnAxZWl02tqmo6bdzCvHWw_Pifv7Es3yKPAWI,52
57
- pymammotion/mammotion/devices/luba.py,sha256=jBZOKv1Q-J0bU23TspOKkC09hPPl-oyB3rYeLaUwJR0,21025
58
- pymammotion/mqtt/mqtt.py,sha256=LLN4vOI-3t5rnLJhMSbHdnIolZNVOJXX4neZTesczFk,9121
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
@@ -95,12 +97,12 @@ pymammotion/proto/mctrl_sys_pb2.py,sha256=fvVXdJtDCcmCGHjib53zkRV6WGqlD3bBs-YR_d
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=BcZYG-FOxAljOcgHY_xoj7zbtEJL_HrXbnTa9IdGl5k,6397
99
- pymammotion/utility/datatype_converter.py,sha256=1YcA9gMvJ6cDnIes0EcibCQuTeItvlEsrlbbYwRtuVI,2558
100
- pymammotion/utility/device_type.py,sha256=wi4EF1u-SEOTbLLftEmCIeJKFpejKW7tqijwVO1-fhs,4468
101
- pymammotion/utility/periodic.py,sha256=3s9Mc_SQfG50hufVSUMQCnQ_5OAm_0wGhlRZ6oFobIw,1047
102
- pymammotion/utility/rocker_util.py,sha256=2wBgTaTp2cphc-IPNVAf-38Q9Kzg_mlQpxYAlLwBdeY,5043
103
- pymammotion-0.0.40.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
104
- pymammotion-0.0.40.dist-info/METADATA,sha256=kURu3rl_OHtWomuyrVwYrzFFKNPo6tHdC9EYL8v4ubw,3563
105
- pymammotion-0.0.40.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
106
- pymammotion-0.0.40.dist-info/RECORD,,
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 1.8.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
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