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

@@ -55,9 +55,9 @@ class MowingDevice(DataClassORJSONMixin):
55
55
  self.location.dock.longitude = parse_double(buffer_list.update_buf_data[8], 4.0)
56
56
  self.location.dock.rotation = buffer_list.update_buf_data[3] + 180
57
57
  case 2:
58
- self.err_code_list.clear()
59
- self.err_code_list_time.clear()
60
- self.err_code_list.extend(
58
+ self.errors.err_code_list.clear()
59
+ self.errors.err_code_list_time.clear()
60
+ self.errors.err_code_list.extend(
61
61
  [
62
62
  buffer_list.update_buf_data[3],
63
63
  buffer_list.update_buf_data[5],
@@ -71,7 +71,7 @@ class MowingDevice(DataClassORJSONMixin):
71
71
  buffer_list.update_buf_data[21],
72
72
  ]
73
73
  )
74
- self.err_code_list_time.extend(
74
+ self.errors.err_code_list_time.extend(
75
75
  [
76
76
  buffer_list.update_buf_data[4],
77
77
  buffer_list.update_buf_data[6],
@@ -87,6 +87,7 @@ class MowingDevice(DataClassORJSONMixin):
87
87
  )
88
88
 
89
89
  def update_report_data(self, toapp_report_data: ReportInfoData) -> None:
90
+ """Set report data for the mower."""
90
91
  coordinate_converter = CoordinateConverter(self.location.RTK.latitude, self.location.RTK.longitude)
91
92
  for index, location in enumerate(toapp_report_data.locations):
92
93
  if index == 0 and location.real_pos_y != 0:
@@ -112,6 +113,7 @@ class MowingDevice(DataClassORJSONMixin):
112
113
  self.report_data.update(toapp_report_data.to_dict(casing=betterproto.Casing.SNAKE))
113
114
 
114
115
  def run_state_update(self, rapid_state: SystemRapidStateTunnelMsg) -> None:
116
+ """Set lat long, work zone of RTK and robot."""
115
117
  coordinate_converter = CoordinateConverter(self.location.RTK.latitude, self.location.RTK.longitude)
116
118
  self.mowing_state = RapidState().from_raw(rapid_state.rapid_state_data)
117
119
  self.location.position_type = self.mowing_state.pos_type
@@ -125,13 +127,13 @@ class MowingDevice(DataClassORJSONMixin):
125
127
  )
126
128
 
127
129
  def mow_info(self, toapp_mow_info: MowToAppInfoT) -> None:
128
- pass
130
+ """Set mow info."""
129
131
 
130
132
  def report_missing_data(self) -> None:
131
133
  """Report missing data so we can refetch it."""
132
134
 
133
135
  def update_device_firmwares(self, fw_info: DeviceFwInfo) -> None:
134
- """Sets firmware versions on all parts of the robot or RTK."""
136
+ """Set firmware versions on all parts of the robot or RTK."""
135
137
  for mod in fw_info.mod:
136
138
  match mod.type:
137
139
  case 1:
@@ -0,0 +1,12 @@
1
+ from dataclasses import field, dataclass
2
+
3
+ from mashumaro.mixins.orjson import DataClassORJSONMixin
4
+
5
+ from pymammotion.http.model.http import ErrorInfo
6
+
7
+
8
+ @dataclass(DataClassORJSONMixin)
9
+ class DeviceErrors:
10
+ err_code_list: list = field(default_factory=list)
11
+ err_code_list_time: list | None = field(default_factory=list)
12
+ error_codes: dict[str, ErrorInfo] = field(default_factory=dict)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.5.6
3
+ Version: 0.5.8
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -25,11 +25,12 @@ pymammotion/const.py,sha256=lWRxvTVdXnNHuxqvRkjO5ziK0Ic-fZMM6J2dbe5M6Nc,385
25
25
  pymammotion/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  pymammotion/data/model/__init__.py,sha256=UVRbSXGOjYnWv30ZEvzT5QRpdVqAbyeToo-t0QBWyi4,292
27
27
  pymammotion/data/model/account.py,sha256=vJM-KTf2q6eBfVC-UlNHBSmJvqHiCawZ40vnuhXhaz8,140
28
- pymammotion/data/model/device.py,sha256=SDmszpde_ZoXSOAkVcZyKAzHLWzNNCM4avpPLJwCWhM,7749
28
+ pymammotion/data/model/device.py,sha256=eu0GA_2FJFgrm_qB2U0Y_LU7xMmLH41kVN9nNlIzcPM,7892
29
29
  pymammotion/data/model/device_config.py,sha256=DTnoePsMwJrKVXqGeKvbZQjs8Zab61U5T3b-c-w0WlM,2654
30
30
  pymammotion/data/model/device_info.py,sha256=Q5PbPdTfd948ZWc8EHjN5zwU6pha5MCr47ZEXzCYKNY,1148
31
31
  pymammotion/data/model/device_limits.py,sha256=m8HdxD-RaAkPm7jHYb9GLxMEH9IfzBPz0ZypmsLnId4,1946
32
32
  pymammotion/data/model/enums.py,sha256=NLImBbeqwbwBLbABC_NbBzk4M8OxhUTcto6QcGZVNOc,1707
33
+ pymammotion/data/model/errors.py,sha256=27QFBtrGuxa0RwZ53CIKno2SeLYh9OBkEhl140gP_EI,392
33
34
  pymammotion/data/model/excute_boarder_params.py,sha256=9CpUqrygcle1C_1hDW-riLmm4map4ZbE842NXjcomEI,1394
34
35
  pymammotion/data/model/execute_boarder.py,sha256=9rd_h4fbcsXxgnLOd2rO2hWyD1abnTGc47QTEpp8DD0,1103
35
36
  pymammotion/data/model/generate_route_information.py,sha256=pgjqURwmEIzjCMbl4Z5JDDkfxyUAdry1KhPfyir3-mU,777
@@ -124,7 +125,7 @@ pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tp
124
125
  pymammotion/utility/mur_mur_hash.py,sha256=xEfOZVbqRawJj66eLgtnZ85OauDR47oIPr29OHelzPI,4468
125
126
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
126
127
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
127
- pymammotion-0.5.6.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
128
- pymammotion-0.5.6.dist-info/METADATA,sha256=NsaDPxB5F_imT-zk9dUnCreCOqOq6TjNrn5gxCshIy8,3870
129
- pymammotion-0.5.6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
130
- pymammotion-0.5.6.dist-info/RECORD,,
128
+ pymammotion-0.5.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
129
+ pymammotion-0.5.8.dist-info/METADATA,sha256=mrFv21PLSWIsA6_dxsKSqW3AeU7TrM_QsabDerHx5J8,3870
130
+ pymammotion-0.5.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
131
+ pymammotion-0.5.8.dist-info/RECORD,,