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

@@ -5,12 +5,16 @@ from pymammotion.mammotion.commands.abstract_message import AbstractMessage
5
5
  from pymammotion.proto import (
6
6
  MUL_LANGUAGE,
7
7
  MUL_SEX,
8
+ GetHeadlamp,
9
+ LampCtrlSta,
10
+ LampManualCtrlSta,
8
11
  LubaMsg,
9
12
  MsgAttr,
10
13
  MsgCmdType,
11
14
  MsgDevice,
12
15
  MulSetAudio,
13
16
  MulSetWiper,
17
+ SetHeadlamp,
14
18
  SocMul,
15
19
  )
16
20
 
@@ -45,4 +49,33 @@ class MessageMedia(AbstractMessage, ABC):
45
49
  # 2
46
50
  return self.send_order_msg_media(SocMul(set_wiper=MulSetWiper(round=round_num)))
47
51
 
48
- # TODO add lamp methods
52
+ def get_car_light(self, ids: int):
53
+ return self.send_order_msg_media(SocMul(get_lamp=GetHeadlamp(get_ids=ids)))
54
+
55
+ def set_car_light(self, on_off: bool = False):
56
+ """Set mower light.
57
+ set whether light is on during the night during mowing
58
+ auto night on true, id=1121, power_ctrl=1
59
+ auto night off false, id=1121, power_ctrl=1
60
+ """
61
+
62
+ ctrl_state = LampCtrlSta.power_ctrl_on if on_off else LampCtrlSta.power_off
63
+ return self.send_order_msg_media(
64
+ SocMul(
65
+ set_lamp=SetHeadlamp(
66
+ set_ids=1121, lamp_power_ctrl=1, lamp_ctrl=ctrl_state, ctrl_lamp_bright=False, lamp_bright=0
67
+ )
68
+ )
69
+ )
70
+
71
+ def set_car_manual_light(self, manual_ctrl: bool = False):
72
+ """Set mower light.
73
+ set whether light is on manually
74
+ manual on: true, id=1125, power_ctrl=2
75
+ manual off: false, id=1127, power_ctrl=2
76
+ """
77
+ ids = 1125 if manual_ctrl else 1127
78
+ manual_light_ctrl = LampManualCtrlSta.manual_power_off if manual_ctrl else LampManualCtrlSta.manual_power_on
79
+ return self.send_order_msg_media(
80
+ SocMul(set_lamp=SetHeadlamp(set_ids=ids, lamp_power_ctrl=2, lamp_manual_ctrl=manual_light_ctrl))
81
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.5.9
3
+ Version: 0.5.10
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -63,7 +63,7 @@ pymammotion/mammotion/commands/abstract_message.py,sha256=P5FcjGkfoQ1O4Q9JKdq306
63
63
  pymammotion/mammotion/commands/mammotion_command.py,sha256=3OFXQjF7HFwPd_j6utHVI2Kfwh7t6_6ff_9MKAWGTlk,2570
64
64
  pymammotion/mammotion/commands/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  pymammotion/mammotion/commands/messages/driver.py,sha256=LAYGvAcDDXwwliQ1OfRwNBk1VpIdpURo1TlA64zpLA4,3701
66
- pymammotion/mammotion/commands/messages/media.py,sha256=a6CY_1wEpepH9zg6-HfH1lt-jtC1sFy8hm7tFRgzlG4,1493
66
+ pymammotion/mammotion/commands/messages/media.py,sha256=BcKOtQn7aRChAw41Er4oxixOuNsIblOejQxrBGTER84,2822
67
67
  pymammotion/mammotion/commands/messages/navigation.py,sha256=aEEpvDW5QukJ0QiWMhPjjz0eTTF1ndQuvv8a6hJlUg0,23257
68
68
  pymammotion/mammotion/commands/messages/network.py,sha256=OrmW4-BP_o3piBjwXZ12WY0HqbXHQqeDXC0YaDPeBM8,7409
69
69
  pymammotion/mammotion/commands/messages/ota.py,sha256=ZHLQRE5ETvLEIu2Vbj3m2XidIWT8uorYSHxkZd3pkRc,1376
@@ -125,7 +125,7 @@ pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tp
125
125
  pymammotion/utility/mur_mur_hash.py,sha256=xEfOZVbqRawJj66eLgtnZ85OauDR47oIPr29OHelzPI,4468
126
126
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
127
127
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
128
- pymammotion-0.5.9.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
129
- pymammotion-0.5.9.dist-info/METADATA,sha256=pFLjwxrtHDSS1DF3FeV_THnz5-OUOd8LWuAI_XeO_68,3870
130
- pymammotion-0.5.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
131
- pymammotion-0.5.9.dist-info/RECORD,,
128
+ pymammotion-0.5.10.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
129
+ pymammotion-0.5.10.dist-info/METADATA,sha256=R9J_whXYxCOIP_CxxXAMx6ZotbuPjgTZD_NNVB9fgFU,3871
130
+ pymammotion-0.5.10.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
131
+ pymammotion-0.5.10.dist-info/RECORD,,