pymammotion 0.2.42__py3-none-any.whl → 0.2.43__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.
- pymammotion/data/model/device.py +2 -1
- pymammotion/data/model/rapid_state.py +3 -1
- pymammotion/data/model/report_info.py +9 -9
- {pymammotion-0.2.42.dist-info → pymammotion-0.2.43.dist-info}/METADATA +1 -1
- {pymammotion-0.2.42.dist-info → pymammotion-0.2.43.dist-info}/RECORD +7 -7
- {pymammotion-0.2.42.dist-info → pymammotion-0.2.43.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.42.dist-info → pymammotion-0.2.43.dist-info}/WHEEL +0 -0
pymammotion/data/model/device.py
CHANGED
@@ -109,7 +109,8 @@ class MowingDevice(DataClassORJSONMixin):
|
|
109
109
|
location.zone_hash if self.report_data.dev.sys_status == WorkMode.MODE_WORKING else 0
|
110
110
|
)
|
111
111
|
|
112
|
-
self.report_data
|
112
|
+
self.report_data.update(toapp_report_data.to_dict(casing=betterproto.Casing.SNAKE))
|
113
|
+
|
113
114
|
|
114
115
|
def run_state_update(self, rapid_state: SystemRapidStateTunnelMsg) -> None:
|
115
116
|
coordinate_converter = CoordinateConverter(self.location.RTK.latitude, self.location.RTK.longitude)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
2
|
from enum import Enum
|
3
3
|
|
4
|
+
from mashumaro.mixins.orjson import DataClassORJSONMixin
|
5
|
+
|
4
6
|
from pymammotion.utility.conversions import parse_double
|
5
7
|
|
6
8
|
|
@@ -11,7 +13,7 @@ class RTKStatus(Enum):
|
|
11
13
|
|
12
14
|
|
13
15
|
@dataclass
|
14
|
-
class RapidState:
|
16
|
+
class RapidState(DataClassORJSONMixin):
|
15
17
|
pos_x: float = 0
|
16
18
|
pos_y: float = 0
|
17
19
|
rtk_status: RTKStatus = RTKStatus.NONE
|
@@ -63,22 +63,22 @@ class WorkData(DataClassORJSONMixin):
|
|
63
63
|
|
64
64
|
|
65
65
|
@dataclass
|
66
|
-
class ReportData:
|
66
|
+
class ReportData(DataClassORJSONMixin):
|
67
67
|
connect: ConnectData = field(default_factory=ConnectData)
|
68
68
|
dev: DeviceData = field(default_factory=DeviceData)
|
69
69
|
rtk: RTKData = field(default_factory=RTKData)
|
70
70
|
locations: list[LocationData] = field(default_factory=list)
|
71
71
|
work: WorkData = field(default_factory=WorkData)
|
72
72
|
|
73
|
-
def
|
73
|
+
def update(self, data: dict):
|
74
74
|
locations = self.locations
|
75
75
|
if data.get("locations") is not None:
|
76
76
|
locations = [LocationData.from_dict(loc) for loc in data.get("locations", [])]
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
78
|
+
|
79
|
+
self.connect=ConnectData.from_dict(data.get("connect", asdict(self.connect)))
|
80
|
+
self.dev=DeviceData.from_dict(data.get("dev", asdict(self.dev)))
|
81
|
+
self.rtk=RTKData.from_dict(data.get("rtk", asdict(self.rtk)))
|
82
|
+
self.locations=locations
|
83
|
+
self.work=WorkData.from_dict(data.get("work", asdict(self.work)))
|
84
|
+
|
@@ -22,7 +22,7 @@ pymammotion/const.py,sha256=lWRxvTVdXnNHuxqvRkjO5ziK0Ic-fZMM6J2dbe5M6Nc,385
|
|
22
22
|
pymammotion/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
23
|
pymammotion/data/model/__init__.py,sha256=aSyroxYQQS-WMRi6WmWm2js4wLa9nmsi160gx9tts4o,323
|
24
24
|
pymammotion/data/model/account.py,sha256=vJM-KTf2q6eBfVC-UlNHBSmJvqHiCawZ40vnuhXhaz8,140
|
25
|
-
pymammotion/data/model/device.py,sha256=
|
25
|
+
pymammotion/data/model/device.py,sha256=s7S6Nicuk3acR8jxeeqZlVTZXB94DjYzo7gYdwjleUs,12071
|
26
26
|
pymammotion/data/model/device_config.py,sha256=RkEbnkubJQ8nXPfZpuGPe_h9mGZGtxCxDSc8mY7UCT8,2824
|
27
27
|
pymammotion/data/model/enums.py,sha256=EpKmO8yVUZyEnTY4yH0DMMVKYNQM42zpW1maUu0i3IE,1582
|
28
28
|
pymammotion/data/model/excute_boarder_params.py,sha256=9CpUqrygcle1C_1hDW-riLmm4map4ZbE842NXjcomEI,1394
|
@@ -32,9 +32,9 @@ pymammotion/data/model/hash_list.py,sha256=efUSelsj39IArxV_GEN7niM2fsVa1OL8ZjTox
|
|
32
32
|
pymammotion/data/model/location.py,sha256=PwmITejfI4pm7PI4rzqSuuHetwle6IJr_CV95435s2M,871
|
33
33
|
pymammotion/data/model/mowing_modes.py,sha256=5TrHSijUyPtIDWpNtgzx_vFQukRJWRz4gIrUaXggKPw,827
|
34
34
|
pymammotion/data/model/plan.py,sha256=mcadkSL7fQXy0iJ0q786I3GEQY4i6kmQXfW6Ri69lcQ,2906
|
35
|
-
pymammotion/data/model/rapid_state.py,sha256=
|
35
|
+
pymammotion/data/model/rapid_state.py,sha256=mIdhAG_LZXpVcybxqTLgLXkNOmVmDTn04B9PGIDA8Ls,1251
|
36
36
|
pymammotion/data/model/region_data.py,sha256=OTV15vRyn9JORXsQPjWMNF1ZujuNhsOKl25KeqwMObA,3007
|
37
|
-
pymammotion/data/model/report_info.py,sha256=
|
37
|
+
pymammotion/data/model/report_info.py,sha256=gY3L4UGEH37PS314e8d7DWuIczQxTIMfcf66xoVe0sY,2210
|
38
38
|
pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
39
39
|
pymammotion/data/mqtt/event.py,sha256=plt53w3kHulB_MfbkxK9j7AfdQ5ahVU2s4kiQMoLio4,4612
|
40
40
|
pymammotion/data/mqtt/properties.py,sha256=HkBPghr26L9_b4QaOi1DtPgb0UoPIOGSe9wb3kgnM6Y,2815
|
@@ -118,7 +118,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
|
|
118
118
|
pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
|
119
119
|
pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
|
120
120
|
pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
|
121
|
-
pymammotion-0.2.
|
122
|
-
pymammotion-0.2.
|
123
|
-
pymammotion-0.2.
|
124
|
-
pymammotion-0.2.
|
121
|
+
pymammotion-0.2.43.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
122
|
+
pymammotion-0.2.43.dist-info/METADATA,sha256=EG9s9oLqTmk_dzxkCpAAYxrCw9XP29gH_2N3L9yL_jM,4052
|
123
|
+
pymammotion-0.2.43.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
124
|
+
pymammotion-0.2.43.dist-info/RECORD,,
|
File without changes
|
File without changes
|