pymammotion 0.5.15__py3-none-any.whl → 0.5.16__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.

@@ -0,0 +1,43 @@
1
+ """RTK protobuf commands."""
2
+
3
+ from abc import ABC
4
+ from logging import getLogger
5
+ import time
6
+
7
+ from pymammotion.mammotion.commands.abstract_message import AbstractMessage
8
+ from pymammotion.proto import (
9
+ AppToBaseMqttRtkT,
10
+ BaseStation,
11
+ LubaMsg,
12
+ MsgAttr,
13
+ MsgCmdType,
14
+ MsgDevice,
15
+ RequestBasestationInfoT,
16
+ )
17
+
18
+ logger = getLogger(__name__)
19
+
20
+
21
+ class MessageBasestation(AbstractMessage, ABC):
22
+ def send_order_msg_basestation(self, driver) -> bytes:
23
+ return LubaMsg(
24
+ msgtype=MsgCmdType.BASESTATION,
25
+ sender=MsgDevice.DEV_MOBILEAPP,
26
+ rcver=self.get_msg_device(MsgCmdType.BASESTATION, MsgDevice.DEV_MAINCTL),
27
+ msgattr=MsgAttr.REQ,
28
+ timestamp=round(time.time() * 1000),
29
+ seqs=self.seqs.increment_and_get() & 255,
30
+ version=1,
31
+ subtype=self.user_account,
32
+ driver=driver,
33
+ ).SerializeToString()
34
+
35
+ def basestation_info(self) -> bytes:
36
+ """Build and send a request to get basestation info (request_type=1)."""
37
+ base = BaseStation(to_dev=RequestBasestationInfoT(request_type=1))
38
+ return self.send_order_msg_basestation(base)
39
+
40
+ def set_base_net_rtk_switch(self, rtk_switch: int) -> bytes:
41
+ """Set RTK switch via app_to_base_mqtt_rtk_t."""
42
+ base = BaseStation(app_to_base_mqtt_rtk_msg=AppToBaseMqttRtkT(rtk_switch=rtk_switch))
43
+ return self.send_order_msg_basestation(base)
@@ -81,7 +81,7 @@ class MessageMedia(AbstractMessage, ABC):
81
81
  manual off: false, id=1127, power_ctrl=2
82
82
  """
83
83
  ids = 1125 if manual_ctrl else 1127
84
- manual_light_ctrl = LampManualCtrlSta.manual_power_off if manual_ctrl else LampManualCtrlSta.manual_power_on
84
+ manual_light_ctrl = LampManualCtrlSta.manual_power_on if manual_ctrl else LampManualCtrlSta.manual_power_off
85
85
  return self.send_order_msg_media(
86
86
  SocMul(set_lamp=SetHeadlamp(set_ids=ids, lamp_power_ctrl=2, lamp_manual_ctrl=manual_light_ctrl))
87
87
  )
@@ -235,6 +235,7 @@ class MsgCmdType(betterproto.Enum):
235
235
  ESP = 248
236
236
  MUL = 249
237
237
  PEPT = 250
238
+ BASESTATION = 251
238
239
 
239
240
 
240
241
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.5.15
3
+ Version: 0.5.16
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -64,8 +64,9 @@ pymammotion/mammotion/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
64
64
  pymammotion/mammotion/commands/abstract_message.py,sha256=M4qL-Yw5g3fTgS9jB9LUSgJSAqpUf7MME-2mfv471Sk,808
65
65
  pymammotion/mammotion/commands/mammotion_command.py,sha256=AMOx6nEbPa0HijbENomPLLuJummS1q-23BzgetBAuOI,2991
66
66
  pymammotion/mammotion/commands/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
+ pymammotion/mammotion/commands/messages/basestation.py,sha256=a1LEF4C25ynILeQLx-FOOU4d-N_vMkXSh_etojJjIDM,1442
67
68
  pymammotion/mammotion/commands/messages/driver.py,sha256=LAYGvAcDDXwwliQ1OfRwNBk1VpIdpURo1TlA64zpLA4,3701
68
- pymammotion/mammotion/commands/messages/media.py,sha256=X4LQG9SFNZXyqeaedjuEM10Jx9Bc6SN7kQFpKxrSFrQ,2934
69
+ pymammotion/mammotion/commands/messages/media.py,sha256=ZKATEvqSgjTGTPrVGjDWCAnI1aq_d4TMXyl4dFzgjhE,2934
69
70
  pymammotion/mammotion/commands/messages/navigation.py,sha256=yI-B5HHGuZJXn9iYrxhYZ5BArde6wB_j9bUc5IcSIJE,23261
70
71
  pymammotion/mammotion/commands/messages/network.py,sha256=OrmW4-BP_o3piBjwXZ12WY0HqbXHQqeDXC0YaDPeBM8,7409
71
72
  pymammotion/mammotion/commands/messages/ota.py,sha256=Nk3Tlp6n7hkbkuy355BlqbozHIHzsYnrH2cDO8QGaLk,1446
@@ -84,7 +85,7 @@ pymammotion/mqtt/linkkit/h2client.py,sha256=w9Nvi_nY4CLD_fw-pHtYChwQf7e2TiAGeqkY
84
85
  pymammotion/mqtt/linkkit/linkkit.py,sha256=SGWny2_LKa8qg8RD0Bgd3a4S_fMqpYxJ7a9eFRvgcN0,132923
85
86
  pymammotion/mqtt/mammotion_future.py,sha256=_OWqKOlUGl2yT1xOsXFQYpGd-1zQ63OxqXgy7KRQgYc,710
86
87
  pymammotion/mqtt/mammotion_mqtt.py,sha256=OtLyTxow8xJc1RK1tv3ZCUBleTLZ3QABKmVYIcynoxU,10208
87
- pymammotion/proto/__init__.py,sha256=dUl6HZ0NMRQUVOWe5Kf3fOJFVC5YJ98I9xEfd1R9Wdg,73487
88
+ pymammotion/proto/__init__.py,sha256=9WLHpBnpdJNWHBstuDpegq_O9KKOtxfSc0AfSd9hfmg,73509
88
89
  pymammotion/proto/basestation.proto,sha256=YiSsDmT0DY_ep6DHay13SbhxGMhentYt0BmJrVQrwLQ,1198
89
90
  pymammotion/proto/basestation_pb2.py,sha256=suenbpMz9JZCXdGJGdiPaapppRz9Cf4IDzAXUfdIG3w,3083
90
91
  pymammotion/proto/basestation_pb2.pyi,sha256=lGcTPlGaLdHEQ1A39YITbMG_vs1cVaqHAg5TsPvzexc,4652
@@ -127,7 +128,7 @@ pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tp
127
128
  pymammotion/utility/mur_mur_hash.py,sha256=xEfOZVbqRawJj66eLgtnZ85OauDR47oIPr29OHelzPI,4468
128
129
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
129
130
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
130
- pymammotion-0.5.15.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
131
- pymammotion-0.5.15.dist-info/METADATA,sha256=LsO3ACCgRJjuuc8XSeSKCvphDUOilr5f9jCjKoAeuro,3871
132
- pymammotion-0.5.15.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
133
- pymammotion-0.5.15.dist-info/RECORD,,
131
+ pymammotion-0.5.16.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
132
+ pymammotion-0.5.16.dist-info/METADATA,sha256=8AyYr3i2vGULlI2Qww8OeWstvRK0VSJWTou5tCX09ac,3871
133
+ pymammotion-0.5.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
134
+ pymammotion-0.5.16.dist-info/RECORD,,