pymammotion 0.3.3__py3-none-any.whl → 0.3.5__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/state_manager.py +2 -2
- pymammotion/mammotion/commands/messages/system.py +14 -2
- pymammotion/mammotion/devices/base.py +1 -1
- pymammotion/utility/constant/device_constant.py +2 -0
- {pymammotion-0.3.3.dist-info → pymammotion-0.3.5.dist-info}/METADATA +1 -1
- {pymammotion-0.3.3.dist-info → pymammotion-0.3.5.dist-info}/RECORD +8 -8
- {pymammotion-0.3.3.dist-info → pymammotion-0.3.5.dist-info}/LICENSE +0 -0
- {pymammotion-0.3.3.dist-info → pymammotion-0.3.5.dist-info}/WHEEL +0 -0
@@ -30,7 +30,7 @@ class StateManager:
|
|
30
30
|
self.get_commondata_ack_callback: Optional[Callable[[NavGetCommDataAck | SvgMessageAckT], Awaitable[None]]] = (
|
31
31
|
None
|
32
32
|
)
|
33
|
-
self.on_notification_callback: Optional[Callable[[], Awaitable[None]]] = None
|
33
|
+
self.on_notification_callback: Optional[Callable[[tuple[str, Any | None]], Awaitable[None]]] = None
|
34
34
|
self.queue_command_callback: Optional[Callable[[str, dict[str, Any]], Awaitable[bytes]]] = None
|
35
35
|
self.last_updated_at = datetime.now()
|
36
36
|
|
@@ -66,7 +66,7 @@ class StateManager:
|
|
66
66
|
self._update_ota_data(message)
|
67
67
|
|
68
68
|
if self.on_notification_callback:
|
69
|
-
await self.on_notification_callback()
|
69
|
+
await self.on_notification_callback(res)
|
70
70
|
|
71
71
|
async def _update_nav_data(self, message) -> None:
|
72
72
|
"""Update nav data."""
|
@@ -262,6 +262,20 @@ class MessageSystem(AbstractMessage, ABC):
|
|
262
262
|
build.todev_report_cfg.act}")
|
263
263
|
return self.send_order_msg_sys_legacy(build)
|
264
264
|
|
265
|
+
def get_maintenance(self) -> bytes:
|
266
|
+
return self.request_iot_sys(
|
267
|
+
rpt_act=RptAct.RPT_START,
|
268
|
+
rpt_info_type=[
|
269
|
+
RptInfoType.RIT_MAINTAIN,
|
270
|
+
RptInfoType.RIT_BASESTATION_INFO,
|
271
|
+
RptInfoType.RIT_FW_INFO,
|
272
|
+
],
|
273
|
+
timeout=1000,
|
274
|
+
period=1000,
|
275
|
+
no_change_period=2000,
|
276
|
+
count=0,
|
277
|
+
)
|
278
|
+
|
265
279
|
def get_report_cfg_stop(self, timeout: int = 10000, period: int = 1000, no_change_period: int = 1000):
|
266
280
|
# TODO use send_order_msg_sys_legacy
|
267
281
|
mctl_sys = MctlSys(
|
@@ -279,7 +293,6 @@ class MessageSystem(AbstractMessage, ABC):
|
|
279
293
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_DEV_LOCAL)
|
280
294
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_WORK)
|
281
295
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_DEV_STA)
|
282
|
-
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_MAINTAIN)
|
283
296
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_VISION_POINT)
|
284
297
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_VIO)
|
285
298
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_VISION_STATISTIC)
|
@@ -315,7 +328,6 @@ class MessageSystem(AbstractMessage, ABC):
|
|
315
328
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_DEV_LOCAL)
|
316
329
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_WORK)
|
317
330
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_DEV_STA)
|
318
|
-
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_MAINTAIN)
|
319
331
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_VISION_POINT)
|
320
332
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_VIO)
|
321
333
|
mctl_sys.todev_report_cfg.sub.append(RptInfoType.RIT_VISION_STATISTIC)
|
@@ -43,7 +43,7 @@ class MammotionBaseDevice:
|
|
43
43
|
self._notify_future: asyncio.Future[bytes] | None = None
|
44
44
|
self._cloud_device = cloud_device
|
45
45
|
|
46
|
-
def set_notification_callback(self, func: Callable[[], Awaitable[None]]) -> None:
|
46
|
+
def set_notification_callback(self, func: Callable[[tuple[str, Any | None]], Awaitable[None]]) -> None:
|
47
47
|
self._state_manager.on_notification_callback = func
|
48
48
|
|
49
49
|
def set_queue_callback(self, func: Callable[[str, dict[str, Any]], Awaitable[bytes]]) -> None:
|
@@ -42,7 +42,7 @@ pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdr
|
|
42
42
|
pymammotion/data/mqtt/event.py,sha256=pEOQcjnv5XKosSPD8UmVAgCAaI8vLuIhGECZcU4xKjk,5055
|
43
43
|
pymammotion/data/mqtt/properties.py,sha256=kvphcjrDuJHuX8Az98-wKeFv_rSmu2Fz9YKLGodGSj0,3759
|
44
44
|
pymammotion/data/mqtt/status.py,sha256=zqnlo-MzejEQZszl0i0Wucoc3E76x6UtI9JLxoBnu54,1067
|
45
|
-
pymammotion/data/state_manager.py,sha256=
|
45
|
+
pymammotion/data/state_manager.py,sha256=W6PjIMXHPObocYay6ZQ7ITju27MA5kK5udFptAydwuE,5382
|
46
46
|
pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
|
47
47
|
pymammotion/event/event.py,sha256=bj2RirSIRyBs0QvkcrOtwZWUX_8F3m1sySuHVyKmZLs,2143
|
48
48
|
pymammotion/http/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -58,12 +58,12 @@ pymammotion/mammotion/commands/messages/media.py,sha256=l-m4l2Vp1ZOHPHyJTceuLaLv
|
|
58
58
|
pymammotion/mammotion/commands/messages/navigation.py,sha256=Z6RQK-pMh8o7_K_1yTENx3lkNBFQTU_ojunolSre0oM,23241
|
59
59
|
pymammotion/mammotion/commands/messages/network.py,sha256=AErasUL7U4lbFKRJPVzUZMHegP5K2Jo9wGmeWruOtUg,7623
|
60
60
|
pymammotion/mammotion/commands/messages/ota.py,sha256=g937HT_-OQXV6A3zUiZ53b45cOX6y-rzs5m-4b0IcTk,1473
|
61
|
-
pymammotion/mammotion/commands/messages/system.py,sha256=
|
61
|
+
pymammotion/mammotion/commands/messages/system.py,sha256=IXm0RxzPUvyXmvtLY59tS9oI2alWMGVNMSQSfog2A-c,14326
|
62
62
|
pymammotion/mammotion/commands/messages/video.py,sha256=xili9khz4Op5NwjXfvIkeRYzQlQPIf8o8bnoYx-Ylpw,1319
|
63
63
|
pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
64
64
|
pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3TTad9wHIPsU9s,5640
|
65
65
|
pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
|
66
|
-
pymammotion/mammotion/devices/base.py,sha256=
|
66
|
+
pymammotion/mammotion/devices/base.py,sha256=n1w-RR9NrMLJIlO5cPaxpcq40ioXKIIbjdZkjcH9lhI,10680
|
67
67
|
pymammotion/mammotion/devices/mammotion.py,sha256=r3G13Wi1szQ1rq6J-Rwl_cddZDyp5DqkZ9BbjF5Kxpg,12538
|
68
68
|
pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=HUOKnjYUWTGjksyQDCPKF_u3dWo2ddgrWCBXnJ2VkwA,18963
|
69
69
|
pymammotion/mammotion/devices/mammotion_cloud.py,sha256=a9fB0ZCYElRxrjnwCM81RXCbxo5kJKhGa-BGck9U3-A,12949
|
@@ -113,7 +113,7 @@ pymammotion/proto/mctrl_sys_pb2.py,sha256=DYemb514mlC7c27t-k1YqqBif0xxhLmnIWk8rX
|
|
113
113
|
pymammotion/proto/mctrl_sys_pb2.pyi,sha256=Dj_1UM86kZ5MfcVyNC76Z0gKrfl5YFsVWP2b-bKoZvk,38912
|
114
114
|
pymammotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
115
|
pymammotion/utility/constant/__init__.py,sha256=tcY0LDeD-qDDHx2LKt55KOyv9ZI0UfCNM6fknLCmm8s,110
|
116
|
-
pymammotion/utility/constant/device_constant.py,sha256=
|
116
|
+
pymammotion/utility/constant/device_constant.py,sha256=RQ0Yi6hQa9hfx4wVXypPaPozahQ8Y4EiU3RWZYDZeOY,7593
|
117
117
|
pymammotion/utility/conversions.py,sha256=v3YICy0zZwwBBzrUZgabI7GRfiDBnkiAX2qdtk3NxOY,89
|
118
118
|
pymammotion/utility/datatype_converter.py,sha256=SPM_HuaaD_XOawlqEnA8qlRRZXGba3WjA8kGOZgeBlQ,4284
|
119
119
|
pymammotion/utility/device_type.py,sha256=xOgfIhOkzgcAtoKtlhlB1q8FpiKe1rVVV5BvN7K7zYc,9433
|
@@ -121,7 +121,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
|
|
121
121
|
pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
|
122
122
|
pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
|
123
123
|
pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
|
124
|
-
pymammotion-0.3.
|
125
|
-
pymammotion-0.3.
|
126
|
-
pymammotion-0.3.
|
127
|
-
pymammotion-0.3.
|
124
|
+
pymammotion-0.3.5.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
125
|
+
pymammotion-0.3.5.dist-info/METADATA,sha256=kLiKLS6ZT4EX9TI1n960hMy5ExbOwzqS6bRWKTz-yIo,3895
|
126
|
+
pymammotion-0.3.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
127
|
+
pymammotion-0.3.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|