pymammotion 0.2.99__py3-none-any.whl → 0.3.1__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.
@@ -627,6 +627,9 @@ class CloudIOTGateway:
627
627
  def send_cloud_command(self, iot_id: str, command: bytes) -> str:
628
628
  """Send a cloud command to the specified IoT device."""
629
629
 
630
+ if command is None:
631
+ raise Exception("Command is missing / None")
632
+
630
633
  """Check if iotToken is expired"""
631
634
  if self._iot_token_issued_at + self._session_by_authcode_response.data.iotTokenExpire <= (
632
635
  int(time.time()) + (5 * 3600)
@@ -37,6 +37,13 @@ class MowOrder(IntEnum):
37
37
  grid_first = 1
38
38
 
39
39
 
40
+ class TraversalMode(IntEnum):
41
+ """Traversal mode when returning."""
42
+
43
+ direct = 0
44
+ follow_perimeter = 1
45
+
46
+
40
47
  class BypassStrategy(IntEnum):
41
48
  """Matches up with ultra_wave."""
42
49
 
@@ -116,22 +116,26 @@ class MessageSystem(AbstractMessage, ABC):
116
116
  op}, cgf:{cgf}")
117
117
  return self.send_order_msg_sys(MctlSys(todev_lora_cfg_req=LoraCfgReq(op=op, cfg=cgf)))
118
118
 
119
- def allpowerfull_rw(self, id: int, context: int, rw: int):
119
+ def allpowerfull_rw(self, id: int, context: int, rw: int) -> bytes:
120
120
  if (id == 6 or id == 3 or id == 7) and DeviceType.is_luba_2(self.get_device_name()):
121
- self.messageNavigation.allpowerfull_rw_adapter_x3(id, context, rw)
122
- return
121
+ return self.messageNavigation.allpowerfull_rw_adapter_x3(id, context, rw)
123
122
  build = MctlSys(bidire_comm_cmd=SysCommCmd(id=id, context=context, rw=rw))
124
123
  logger.debug(f"Send command - 9 general read and write command id={id}, context={context}, rw={rw}")
125
124
  if id == 5:
126
- # This logic doesnt make snese, but its what they had so..
125
+ # TODO investigate if the original code makes any difference to this call.
126
+ """
127
+ LubaMsgOuterClass.LubaMsg.Builder protoBufBuilderSet = getProtoBufBuilderSet(LubaMsgOuterClass.MsgCmdType.MSG_CMD_TYPE_EMBED_SYS, LubaMsgOuterClass.MsgDevice.DEV_MAINCTL, LubaMsgOuterClass.MsgAttr.MSG_ATTR_REQ);
128
+ protoBufBuilderSet.setSys(build);
129
+ sendMsg(protoBufBuilderSet, 122, true, "发送指令--9通用读写命令id=" + i + ",context=" + i2 + ",rw=" + i3);
130
+ """
127
131
  return self.send_order_msg_sys(build)
128
132
  return self.send_order_msg_sys(build)
129
133
 
130
- def traverse_mode(self, id: int) -> None:
134
+ def traverse_mode(self, id: int) -> bytes:
131
135
  """Sets the traversal mode back to charger."""
132
136
  # 0 direct
133
137
  # 1 follow the perimeter
134
- self.allpowerfull_rw(7, id, 1)
138
+ return self.allpowerfull_rw(7, id, 1)
135
139
 
136
140
  # Commented out as not needed and too many refs to try fix up
137
141
  # def factory_test_order(self, test_id: int, test_duration: int, expect: str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.2.99
3
+ Version: 0.3.1
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -1,6 +1,6 @@
1
1
  pymammotion/__init__.py,sha256=BcwrItywpSECTxrTPwEuBExi_ekOrG2M2tbphuotIlE,1617
2
2
  pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
3
- pymammotion/aliyun/cloud_gateway.py,sha256=pv3Ag9U0OKk0vBzGJCklS59mbUb4O6sDjLM329uaBho,25791
3
+ pymammotion/aliyun/cloud_gateway.py,sha256=bFlVEmKBocxbD8ZxTXFXQZi4GwTDhzxChITJadzX2W0,25877
4
4
  pymammotion/aliyun/cloud_service.py,sha256=px7dUKow5Z7VyebjYzuKkzkm77XbUXYiFiYO_2e-UQ0,2207
5
5
  pymammotion/aliyun/model/aep_response.py,sha256=8f6GIP58ve8gd6AL3HBoXxsy0n2q4ygWvjELGnoOnVc,452
6
6
  pymammotion/aliyun/model/connect_response.py,sha256=Yz-fEbDzgGPTo5Of2oAjmFkSv08T7ze80pQU4k-gKIU,824
@@ -33,7 +33,7 @@ pymammotion/data/model/execute_boarder.py,sha256=9rd_h4fbcsXxgnLOd2rO2hWyD1abnTG
33
33
  pymammotion/data/model/generate_route_information.py,sha256=tCF3-HDm4O30hy8BJrTOaMpP3ArHbI9i9ZG7ARc5eLg,777
34
34
  pymammotion/data/model/hash_list.py,sha256=ZPg5d1hy4bPMgPw5JkHujT06LIoEmXn7qSdQW79FF3A,6257
35
35
  pymammotion/data/model/location.py,sha256=PwmITejfI4pm7PI4rzqSuuHetwle6IJr_CV95435s2M,871
36
- pymammotion/data/model/mowing_modes.py,sha256=5TrHSijUyPtIDWpNtgzx_vFQukRJWRz4gIrUaXggKPw,827
36
+ pymammotion/data/model/mowing_modes.py,sha256=87R4T-hs6tZ0baPvdYII9Fd6ZbJRqkXj7MRFZ7nIPOY,941
37
37
  pymammotion/data/model/plan.py,sha256=mcadkSL7fQXy0iJ0q786I3GEQY4i6kmQXfW6Ri69lcQ,2906
38
38
  pymammotion/data/model/rapid_state.py,sha256=mIdhAG_LZXpVcybxqTLgLXkNOmVmDTn04B9PGIDA8Ls,1251
39
39
  pymammotion/data/model/region_data.py,sha256=OTV15vRyn9JORXsQPjWMNF1ZujuNhsOKl25KeqwMObA,3007
@@ -58,7 +58,7 @@ 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=dk-4UL0P1efDimO939qXX9XhhaoKLz9rHrWRAPi8-YM,13607
61
+ pymammotion/mammotion/commands/messages/system.py,sha256=DZ-5KS0KSqJ0nDYenn7JST3Z_vT4Oron-7685q4jshg,14059
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
@@ -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.2.99.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
125
- pymammotion-0.2.99.dist-info/METADATA,sha256=QvQ7SQqXo0SMLk45x9Cjnrv6Ytk-CKH7Ie7zti4j-Jw,3896
126
- pymammotion-0.2.99.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
127
- pymammotion-0.2.99.dist-info/RECORD,,
124
+ pymammotion-0.3.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
125
+ pymammotion-0.3.1.dist-info/METADATA,sha256=P2iaQ17DWpGNvSEyEe5_L4qDC42jfXCeHw0meZMQues,3895
126
+ pymammotion-0.3.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
127
+ pymammotion-0.3.1.dist-info/RECORD,,