pymammotion 0.2.73__py3-none-any.whl → 0.2.75__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.
@@ -21,7 +21,9 @@ class MammotionBLE:
21
21
  # TODO: do something with incoming data
22
22
  print(device)
23
23
  print(advertising_data)
24
- if advertising_data.local_name and ("Luba-" in advertising_data.local_name or "Yuka-" in advertising_data.local_name):
24
+ if advertising_data.local_name and (
25
+ "Luba-" in advertising_data.local_name or "Yuka-" in advertising_data.local_name
26
+ ):
25
27
  return True
26
28
  return False
27
29
 
@@ -36,33 +36,29 @@ class OperationSettings(DataClassORJSONMixin):
36
36
  toward: int = 0 # is just angle
37
37
  toward_included_angle: int = 90
38
38
  toward_mode: int = 0 # angle type relative etc
39
- border_mode: int = 1 # border laps
39
+ border_mode: int = 1
40
40
  obstacle_laps: int = 1
41
- mowing_laps: int = 1
41
+ mowing_laps: int = 1 # border laps
42
42
  start_progress: int = 0
43
43
  areas: list[int] = field(default_factory=list)
44
44
 
45
45
 
46
46
  def create_path_order(operation_mode: OperationSettings, device_name: str) -> str:
47
- i = 8
47
+ # TODO add scheduling logic from getReserved() WorkSettingViewModel.java
48
+ i2 = 0
48
49
  bArr = bytearray(8)
49
50
  bArr[0] = operation_mode.border_mode
50
51
  bArr[1] = operation_mode.obstacle_laps
51
52
  bArr[3] = int(operation_mode.start_progress)
52
53
  bArr[2] = 0
53
-
54
54
  if not DeviceType.is_luba1(device_name):
55
55
  bArr[4] = 0
56
56
  if DeviceType.is_yuka(device_name):
57
- i = calculate_yuka_mode(operation_mode)
58
- elif not DeviceType.is_luba_2(device_name):
59
- i = 0
60
- bArr[5] = i
61
- if operation_mode.is_dump:
62
- b = int(operation_mode.collect_grass_frequency)
57
+ bArr[5] = calculate_yuka_mode(operation_mode)
63
58
  else:
64
- b = 10
65
- bArr[6] = b
59
+ bArr[5] = 8 if DeviceType.is_luba_2(device_name) else 0
60
+
61
+ bArr[6] = int(operation_mode.collect_grass_frequency) if operation_mode.is_dump else 10
66
62
  if DeviceType.is_luba1(device_name):
67
63
  bArr[4] = operation_mode.toward_mode
68
64
  return bArr.decode()
@@ -10,7 +10,7 @@ class GenerateRouteInformation:
10
10
  """Creates a model for generating route information and mowing plan before starting a job."""
11
11
 
12
12
  one_hashs: list[int] = list
13
- job_mode: int = 0 # taskMode
13
+ job_mode: int = 4 # taskMode
14
14
  job_version: int = 0
15
15
  job_id: int = 0
16
16
  speed: float = 0.3
@@ -33,8 +33,8 @@ class ObstacleLapsMode(IntEnum):
33
33
  class MowOrder(IntEnum):
34
34
  """path_order"""
35
35
 
36
- border_first = 0
37
- grid_first = 1
36
+ grid_first = 0
37
+ border_first = 1
38
38
 
39
39
 
40
40
  class BypassStrategy(IntEnum):
@@ -75,7 +75,7 @@ class DeviceBizReqEventValue(DataClassORJSONMixin):
75
75
  class GeneralParams(DataClassORJSONMixin):
76
76
  groupIdList: list[str]
77
77
  groupId: str
78
- categoryKey: Literal["LawnMower"]
78
+ categoryKey: Literal["LawnMower", "Tracker"]
79
79
  batchId: str
80
80
  gmtCreate: int
81
81
  productKey: str
@@ -42,11 +42,11 @@ class MammotionCommand(
42
42
  def move_left(self, angular: float) -> bytes:
43
43
  """Move forward. values 0.0 1.0."""
44
44
  angular_percent = get_percent(abs(angular * 100))
45
- (linear_speed, angular_speed) = transform_both_speeds(0.0, 0.0, 0.0, angular_percent)
45
+ (linear_speed, angular_speed) = transform_both_speeds(0.0, 180.0, 0.0, angular_percent)
46
46
  return self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
47
47
 
48
48
  def move_right(self, angular: float) -> bytes:
49
49
  """Move back. values 0.0 1.0."""
50
50
  angular_percent = get_percent(abs(angular * 100))
51
- (linear_speed, angular_speed) = transform_both_speeds(0.0, 180.0, 0.0, angular_percent)
51
+ (linear_speed, angular_speed) = transform_both_speeds(0.0, 0.0, 0.0, angular_percent)
52
52
  return self.send_movement(linear_speed=linear_speed, angular_speed=angular_speed)
@@ -322,7 +322,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
322
322
  self._update_raw_data(data)
323
323
  except (KeyError, ValueError, IndexError, UnicodeDecodeError):
324
324
  _LOGGER.exception("Error parsing message %s", data)
325
- data = b''
325
+ data = b""
326
326
  finally:
327
327
  self._message.clearNotification()
328
328
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.2.73
3
+ Version: 0.2.75
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -11,7 +11,7 @@ pymammotion/aliyun/model/session_by_authcode_response.py,sha256=qW0pnnRXfyEuMbb9
11
11
  pymammotion/aliyun/model/stream_subscription_response.py,sha256=po765WASQDboVCosbPEfDHNlanBf-3WMrA6iV3ezooY,357
12
12
  pymammotion/aliyun/tmp_constant.py,sha256=M4Hq_lrGB3LZdX6R2XohRPFoK1NDnNV-pTJwJcJ9838,6650
13
13
  pymammotion/bluetooth/__init__.py,sha256=LAl8jqZ1fPh-3mLmViNQsP3s814C1vsocYUa6oSaXt0,36
14
- pymammotion/bluetooth/ble.py,sha256=sIY0vtUazXDWd_YjIFk9QEbOh_NQ9y5fVrQIemDhKd8,2374
14
+ pymammotion/bluetooth/ble.py,sha256=Z2cO1EV2ndORKoJMzc2RdUdYbUe_PIzxCZICJg0_V24,2404
15
15
  pymammotion/bluetooth/ble_message.py,sha256=toPhMOgmHEdHzvaOsgCUfrkjdI38oeS4Av0E-I8X0_s,14952
16
16
  pymammotion/bluetooth/const.py,sha256=CCqyHsYbB0BAYjwdhXt_n6eWWxmhlUrAFjvVv57mbvE,1749
17
17
  pymammotion/bluetooth/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -23,21 +23,21 @@ pymammotion/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
23
23
  pymammotion/data/model/__init__.py,sha256=aSyroxYQQS-WMRi6WmWm2js4wLa9nmsi160gx9tts4o,323
24
24
  pymammotion/data/model/account.py,sha256=vJM-KTf2q6eBfVC-UlNHBSmJvqHiCawZ40vnuhXhaz8,140
25
25
  pymammotion/data/model/device.py,sha256=uta1BzfCIKd7Z0naw7JcEGy273yMdcAJ7pjidfpGhKQ,12315
26
- pymammotion/data/model/device_config.py,sha256=SMBrG-rjN58Z59V-ok3wQ0721BQxM9zSdYXI3Q8GFdY,2828
26
+ pymammotion/data/model/device_config.py,sha256=GcKlH2BXPpQitvOmGSK1QQ48YMGuNa_nA_kjq8Gj_vE,2852
27
27
  pymammotion/data/model/device_info.py,sha256=ahz2xILdSYdX6SIVuVzz8QCfSQLefbQnpXrsiDpBDbY,585
28
28
  pymammotion/data/model/enums.py,sha256=EpKmO8yVUZyEnTY4yH0DMMVKYNQM42zpW1maUu0i3IE,1582
29
29
  pymammotion/data/model/excute_boarder_params.py,sha256=9CpUqrygcle1C_1hDW-riLmm4map4ZbE842NXjcomEI,1394
30
30
  pymammotion/data/model/execute_boarder.py,sha256=9rd_h4fbcsXxgnLOd2rO2hWyD1abnTGc47QTEpp8DD0,1103
31
- pymammotion/data/model/generate_route_information.py,sha256=MkUBoqGtCAKmiVQ4Q1pEoDVHZs5uLIo7vhfWT4nGbtY,801
31
+ pymammotion/data/model/generate_route_information.py,sha256=CznXOT8fRsFrRHnjPAnU9XyW0ZoxzgEeMnSyUEyeWXY,801
32
32
  pymammotion/data/model/hash_list.py,sha256=ZPg5d1hy4bPMgPw5JkHujT06LIoEmXn7qSdQW79FF3A,6257
33
33
  pymammotion/data/model/location.py,sha256=PwmITejfI4pm7PI4rzqSuuHetwle6IJr_CV95435s2M,871
34
- pymammotion/data/model/mowing_modes.py,sha256=5TrHSijUyPtIDWpNtgzx_vFQukRJWRz4gIrUaXggKPw,827
34
+ pymammotion/data/model/mowing_modes.py,sha256=F7ah4QtYBBeXXJKdQVeQQMBjynQU8RQzIev7-v6t14c,827
35
35
  pymammotion/data/model/plan.py,sha256=mcadkSL7fQXy0iJ0q786I3GEQY4i6kmQXfW6Ri69lcQ,2906
36
36
  pymammotion/data/model/rapid_state.py,sha256=mIdhAG_LZXpVcybxqTLgLXkNOmVmDTn04B9PGIDA8Ls,1251
37
37
  pymammotion/data/model/region_data.py,sha256=OTV15vRyn9JORXsQPjWMNF1ZujuNhsOKl25KeqwMObA,3007
38
38
  pymammotion/data/model/report_info.py,sha256=m3T2P2mLfy5wDDpyjM2q1y9zCKJJKIItNX0M-Ge1ijg,2577
39
39
  pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
40
- pymammotion/data/mqtt/event.py,sha256=z6j8t-ZOjEeKjFt7S0wV8vV5L0-iHD3RbwI9hCfzGTY,5044
40
+ pymammotion/data/mqtt/event.py,sha256=pEOQcjnv5XKosSPD8UmVAgCAaI8vLuIhGECZcU4xKjk,5055
41
41
  pymammotion/data/mqtt/properties.py,sha256=kvphcjrDuJHuX8Az98-wKeFv_rSmu2Fz9YKLGodGSj0,3759
42
42
  pymammotion/data/mqtt/status.py,sha256=zqnlo-MzejEQZszl0i0Wucoc3E76x6UtI9JLxoBnu54,1067
43
43
  pymammotion/data/state_manager.py,sha256=vtBT28-5DY58hJMi_kqOUKnOq6rJ4fx1zX8yU7N96A8,5357
@@ -49,7 +49,7 @@ pymammotion/http/model/http.py,sha256=1NJP4hkBulcnpbD7Rcwltd8Ry9lnZzQVFJN8Oo7MKe
49
49
  pymammotion/mammotion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  pymammotion/mammotion/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  pymammotion/mammotion/commands/abstract_message.py,sha256=l2Wcyg7tIEjRGyQAk9T2rQVOLwilxG1hXTNf7811jGA,727
52
- pymammotion/mammotion/commands/mammotion_command.py,sha256=cjbetadbNWBBfhzxuT34jfmzfpYYa1CnsCeQZkANVG4,2510
52
+ pymammotion/mammotion/commands/mammotion_command.py,sha256=PM9UCuBCKp_TWDfkeVJsBelSbRrKosRa2LvHA-By1k8,2510
53
53
  pymammotion/mammotion/commands/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  pymammotion/mammotion/commands/messages/driver.py,sha256=DlOAC_yi1ycO5hKr5rfCpLmrqao6Mb6Fv1JWwMISnKE,3766
55
55
  pymammotion/mammotion/commands/messages/media.py,sha256=l-m4l2Vp1ZOHPHyJTceuLaLvdgHOEfmykkbDncCDUI4,1359
@@ -63,7 +63,7 @@ pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3T
63
63
  pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
64
64
  pymammotion/mammotion/devices/base.py,sha256=F_L5aDtY6rgRkk7Q4CwilLenTANW6cBe9zIU3a9HRmA,10020
65
65
  pymammotion/mammotion/devices/mammotion.py,sha256=hSO184o1q4ftfLPx9froFPIXk428wGg8Ayw160W3z7c,12482
66
- pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=3qC2AhXP1ua1pmUaK1iH8sonEIbLPfDLCbsU9H6VsPY,18903
66
+ pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=ZsLsMlsgGG8uNlgoYvifxSRrUsoM0-9UlyY3f77ZmRI,18903
67
67
  pymammotion/mammotion/devices/mammotion_cloud.py,sha256=7xbSZmC1PUG6ZfF5LtiELkQE61lybHoJcBUzz76VvLg,12074
68
68
  pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
69
69
  pymammotion/mqtt/mammotion_future.py,sha256=_OWqKOlUGl2yT1xOsXFQYpGd-1zQ63OxqXgy7KRQgYc,710
@@ -119,7 +119,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
119
119
  pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
120
120
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
121
121
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
122
- pymammotion-0.2.73.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
123
- pymammotion-0.2.73.dist-info/METADATA,sha256=AJ_n-WI2GiEaPM1q8HxmXrwo7wvJ7fZa8cri0Saa3_Y,3896
124
- pymammotion-0.2.73.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
125
- pymammotion-0.2.73.dist-info/RECORD,,
122
+ pymammotion-0.2.75.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
123
+ pymammotion-0.2.75.dist-info/METADATA,sha256=dwEj32VdMUAHgCxlhG2aE57FnGWPhJ3HV0aB-qfbnRY,3896
124
+ pymammotion-0.2.75.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
125
+ pymammotion-0.2.75.dist-info/RECORD,,