pymammotion 0.1.6__py3-none-any.whl → 0.1.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.

@@ -1,4 +1,5 @@
1
- from dataclasses import dataclass, field
1
+ from dataclasses import dataclass, field, asdict
2
+
2
3
 
3
4
  @dataclass
4
5
  class ConnectData:
@@ -72,6 +73,7 @@ class LocationData:
72
73
 
73
74
  @dataclass
74
75
  class WorkData:
76
+ path: int = 0
75
77
  path_hash: str = ""
76
78
  progress: int = 0
77
79
  area: int = 0
@@ -80,14 +82,22 @@ class WorkData:
80
82
  bp_pos_x: int = 0
81
83
  bp_pos_y: int = 0
82
84
  real_path_num: str = ""
85
+ path_pos_x: int = 0
86
+ path_pos_y: int = 0
83
87
  ub_zone_hash: str = ""
88
+ ub_path_hash: str = ""
84
89
  init_cfg_hash: str = ""
85
90
  ub_ecode_hash: str = ""
91
+ nav_run_mode: int = 0
92
+ test_mode_status: int = 0
93
+ man_run_speed: int = 0
94
+ nav_edit_status: int = 0
86
95
  knife_height: int = 0
87
96
 
88
97
  @classmethod
89
98
  def from_dict(cls, data: dict):
90
99
  return cls(
100
+ path=data.get('path', 0),
91
101
  path_hash=data.get('path_hash', ""),
92
102
  progress=data.get('progress', 0),
93
103
  area=data.get('area', 0),
@@ -96,9 +106,16 @@ class WorkData:
96
106
  bp_pos_x=data.get('bp_pos_x', 0),
97
107
  bp_pos_y=data.get('bp_pos_y', 0),
98
108
  real_path_num=data.get('real_path_num', ""),
109
+ path_pos_x=data.get('path_pos_x', 0),
110
+ path_pos_y=data.get('path_pos_y', 0),
99
111
  ub_zone_hash=data.get('ub_zone_hash', ""),
112
+ ub_path_hash=data.get('ub_path_hash', ""),
100
113
  init_cfg_hash=data.get('init_cfg_hash', ""),
101
114
  ub_ecode_hash=data.get('ub_ecode_hash', ""),
115
+ nav_run_mode=data.get('nav_run_mode', 0),
116
+ test_mode_status=data.get('test_mode_status', 0),
117
+ man_run_speed=data.get('man_run_speed', 0),
118
+ nav_edit_status=data.get('nav_edit_status', 0),
102
119
  knife_height=data.get('knife_height', 0)
103
120
  )
104
121
 
@@ -112,10 +129,14 @@ class ReportData:
112
129
 
113
130
  @classmethod
114
131
  def from_dict(cls, data: dict):
132
+ locations = cls.locations
133
+ if data.get('locations') is not None:
134
+ locations=[LocationData.from_dict(loc) for loc in data.get('locations', [])]
135
+
115
136
  return cls(
116
- connect=ConnectData.from_dict(data.get('connect', {})),
117
- dev=DeviceData.from_dict(data.get('dev', {})),
118
- rtk=RTKData.from_dict(data.get('rtk', {})),
119
- locations=[LocationData.from_dict(loc) for loc in data.get('locations', [])],
120
- work=WorkData.from_dict(data.get('work', {}))
137
+ connect=ConnectData.from_dict(data.get('connect', asdict(cls.connect))),
138
+ dev=DeviceData.from_dict(data.get('dev', asdict(cls.dev))),
139
+ rtk=RTKData.from_dict(data.get('rtk', asdict(cls.rtk))),
140
+ locations=locations,
141
+ work=WorkData.from_dict(data.get('work', asdict(cls.work)))
121
142
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -32,7 +32,7 @@ pymammotion/data/model/mowing_modes.py,sha256=121zhvouPKRbF7mynJIc7tJ0zO9bS-Nq4C
32
32
  pymammotion/data/model/plan.py,sha256=7JvqAo0a9Yg1Vtifd4J3Dx3StEppxrMOfmq2-877kYg,2891
33
33
  pymammotion/data/model/rapid_state.py,sha256=_e9M-65AbkvIqXyMYzLKBxbNvpso42qD8R-JSt66THY,986
34
34
  pymammotion/data/model/region_data.py,sha256=75xOTM1qeRbSROp53eIczw3yCmYM9DgMjMh8qE9xkKo,2880
35
- pymammotion/data/model/report_info.py,sha256=ISk_ZT-GoL9Os-2FmxuTnXr2-28DiDhQVo6YEaGhJrg,3639
35
+ pymammotion/data/model/report_info.py,sha256=GAQH6VpsTxkrfFmbUk6mngajN2KcOFlvbFVchDPOCzw,4448
36
36
  pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
37
37
  pymammotion/data/mqtt/event.py,sha256=kEilMLmwZG2nbokLw7X28KF3b-te8G-MfNARYm4LG6I,2170
38
38
  pymammotion/data/mqtt/properties.py,sha256=HkBPghr26L9_b4QaOi1DtPgb0UoPIOGSe9wb3kgnM6Y,2815
@@ -109,7 +109,7 @@ pymammotion/utility/device_type.py,sha256=KYawu2glZMVlPmxRbA4kVFujXz3miHp3rJiOWR
109
109
  pymammotion/utility/map.py,sha256=GNDcA-YBIglRJjvQylNdJVefoVzlH16mFSxnojK_B_A,2175
110
110
  pymammotion/utility/periodic.py,sha256=9wJMfwXPlx6Mbp3Fws7LLTI34ZDKphH1bva_Ggyk32g,3281
111
111
  pymammotion/utility/rocker_util.py,sha256=syPL0QN4zMzHiTIkUKS7RXBBptjdbkfNlPddwUD5V3A,7171
112
- pymammotion-0.1.6.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
113
- pymammotion-0.1.6.dist-info/METADATA,sha256=e3upvDI7cJZX1R99b6WpgoS07JnTbfoG5dUpd7oNum4,3922
114
- pymammotion-0.1.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
- pymammotion-0.1.6.dist-info/RECORD,,
112
+ pymammotion-0.1.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
113
+ pymammotion-0.1.8.dist-info/METADATA,sha256=BukZKRZVSNk69bgGkbJSD-2I9qSpDCQeVK8sboK5KjE,3922
114
+ pymammotion-0.1.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
+ pymammotion-0.1.8.dist-info/RECORD,,