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

Files changed (135) hide show
  1. pymammotion/__init__.py +9 -6
  2. pymammotion/aliyun/client.py +235 -0
  3. pymammotion/aliyun/cloud_gateway.py +320 -69
  4. pymammotion/aliyun/model/aep_response.py +1 -2
  5. pymammotion/aliyun/model/dev_by_account_response.py +170 -23
  6. pymammotion/aliyun/model/login_by_oauth_response.py +2 -3
  7. pymammotion/aliyun/model/regions_response.py +3 -3
  8. pymammotion/aliyun/model/session_by_authcode_response.py +2 -2
  9. pymammotion/aliyun/model/thing_response.py +12 -0
  10. pymammotion/aliyun/regions.py +62 -0
  11. pymammotion/aliyun/tea/core.py +297 -0
  12. pymammotion/bluetooth/ble.py +11 -15
  13. pymammotion/bluetooth/ble_message.py +389 -106
  14. pymammotion/bluetooth/model/atomic_integer.py +54 -0
  15. pymammotion/const.py +3 -0
  16. pymammotion/data/model/__init__.py +1 -2
  17. pymammotion/data/model/device.py +92 -240
  18. pymammotion/data/model/device_config.py +10 -24
  19. pymammotion/data/model/device_info.py +35 -0
  20. pymammotion/data/model/device_limits.py +49 -0
  21. pymammotion/data/model/enums.py +12 -2
  22. pymammotion/data/model/errors.py +12 -0
  23. pymammotion/data/model/events.py +14 -0
  24. pymammotion/data/model/generate_geojson.py +521 -0
  25. pymammotion/data/model/generate_route_information.py +3 -4
  26. pymammotion/data/model/hash_list.py +384 -48
  27. pymammotion/data/model/location.py +4 -4
  28. pymammotion/data/model/mowing_modes.py +24 -1
  29. pymammotion/data/model/raw_data.py +215 -0
  30. pymammotion/data/model/region_data.py +10 -11
  31. pymammotion/data/model/report_info.py +62 -6
  32. pymammotion/data/model/work.py +27 -0
  33. pymammotion/data/mower_state_manager.py +316 -0
  34. pymammotion/data/mqtt/event.py +73 -28
  35. pymammotion/data/mqtt/mammotion_properties.py +257 -0
  36. pymammotion/data/mqtt/properties.py +93 -78
  37. pymammotion/data/mqtt/status.py +18 -17
  38. pymammotion/event/event.py +32 -8
  39. pymammotion/homeassistant/__init__.py +3 -0
  40. pymammotion/homeassistant/mower_api.py +484 -0
  41. pymammotion/homeassistant/rtk_api.py +54 -0
  42. pymammotion/http/__init__.py +0 -0
  43. pymammotion/http/encryption.py +220 -0
  44. pymammotion/http/http.py +652 -44
  45. pymammotion/http/model/__init__.py +0 -0
  46. pymammotion/{aliyun/model/stream_subscription_response.py → http/model/camera_stream.py} +14 -2
  47. pymammotion/http/model/http.py +160 -9
  48. pymammotion/http/model/response_factory.py +61 -0
  49. pymammotion/http/model/rtk.py +16 -0
  50. pymammotion/mammotion/commands/abstract_message.py +7 -5
  51. pymammotion/mammotion/commands/mammotion_command.py +32 -3
  52. pymammotion/mammotion/commands/messages/basestation.py +43 -0
  53. pymammotion/mammotion/commands/messages/driver.py +61 -29
  54. pymammotion/mammotion/commands/messages/media.py +68 -15
  55. pymammotion/mammotion/commands/messages/navigation.py +61 -25
  56. pymammotion/mammotion/commands/messages/network.py +93 -100
  57. pymammotion/mammotion/commands/messages/ota.py +18 -18
  58. pymammotion/mammotion/commands/messages/system.py +97 -72
  59. pymammotion/mammotion/commands/messages/video.py +17 -12
  60. pymammotion/mammotion/devices/__init__.py +27 -3
  61. pymammotion/mammotion/devices/base.py +50 -127
  62. pymammotion/mammotion/devices/mammotion.py +447 -212
  63. pymammotion/mammotion/devices/mammotion_bluetooth.py +105 -60
  64. pymammotion/mammotion/devices/mammotion_cloud.py +157 -105
  65. pymammotion/mammotion/devices/mammotion_mower_ble.py +49 -0
  66. pymammotion/mammotion/devices/mammotion_mower_cloud.py +39 -0
  67. pymammotion/mammotion/devices/managers/managers.py +81 -0
  68. pymammotion/mammotion/devices/mower_device.py +124 -0
  69. pymammotion/mammotion/devices/mower_manager.py +107 -0
  70. pymammotion/mammotion/devices/rtk_ble.py +89 -0
  71. pymammotion/mammotion/devices/rtk_cloud.py +113 -0
  72. pymammotion/mammotion/devices/rtk_device.py +50 -0
  73. pymammotion/mammotion/devices/rtk_manager.py +122 -0
  74. pymammotion/mqtt/__init__.py +2 -1
  75. pymammotion/mqtt/aliyun_mqtt.py +232 -0
  76. pymammotion/mqtt/linkkit/__init__.py +5 -0
  77. pymammotion/mqtt/linkkit/h2client.py +585 -0
  78. pymammotion/mqtt/linkkit/linkkit.py +3023 -0
  79. pymammotion/mqtt/mammotion_mqtt.py +176 -169
  80. pymammotion/mqtt/mqtt_models.py +66 -0
  81. pymammotion/proto/__init__.py +4839 -4
  82. pymammotion/proto/basestation.proto +8 -0
  83. pymammotion/proto/basestation_pb2.py +11 -9
  84. pymammotion/proto/basestation_pb2.pyi +16 -2
  85. pymammotion/proto/dev_net.proto +79 -55
  86. pymammotion/proto/dev_net_pb2.py +60 -56
  87. pymammotion/proto/dev_net_pb2.pyi +49 -6
  88. pymammotion/proto/luba_msg.proto +2 -1
  89. pymammotion/proto/luba_msg_pb2.py +6 -6
  90. pymammotion/proto/luba_msg_pb2.pyi +1 -0
  91. pymammotion/proto/luba_mul.proto +62 -1
  92. pymammotion/proto/luba_mul_pb2.py +38 -22
  93. pymammotion/proto/luba_mul_pb2.pyi +94 -7
  94. pymammotion/proto/mctrl_driver.proto +44 -4
  95. pymammotion/proto/mctrl_driver_pb2.py +26 -14
  96. pymammotion/proto/mctrl_driver_pb2.pyi +66 -11
  97. pymammotion/proto/mctrl_nav.proto +97 -51
  98. pymammotion/proto/mctrl_nav_pb2.py +75 -67
  99. pymammotion/proto/mctrl_nav_pb2.pyi +142 -56
  100. pymammotion/proto/mctrl_ota.proto +40 -2
  101. pymammotion/proto/mctrl_ota_pb2.py +23 -13
  102. pymammotion/proto/mctrl_ota_pb2.pyi +67 -4
  103. pymammotion/proto/mctrl_pept.proto +8 -3
  104. pymammotion/proto/mctrl_pept_pb2.py +8 -6
  105. pymammotion/proto/mctrl_pept_pb2.pyi +14 -6
  106. pymammotion/proto/mctrl_sys.proto +325 -86
  107. pymammotion/proto/mctrl_sys_pb2.py +162 -98
  108. pymammotion/proto/mctrl_sys_pb2.pyi +451 -25
  109. pymammotion/proto/message_pool.py +3 -0
  110. pymammotion/proto/py.typed +0 -0
  111. pymammotion/utility/constant/device_constant.py +65 -21
  112. pymammotion/utility/datatype_converter.py +13 -12
  113. pymammotion/utility/device_config.py +755 -0
  114. pymammotion/utility/device_type.py +218 -21
  115. pymammotion/utility/map.py +238 -51
  116. pymammotion/utility/mur_mur_hash.py +159 -0
  117. {pymammotion-0.2.62.dist-info → pymammotion-0.5.51.dist-info}/METADATA +27 -31
  118. pymammotion-0.5.51.dist-info/RECORD +152 -0
  119. {pymammotion-0.2.62.dist-info → pymammotion-0.5.51.dist-info}/WHEEL +1 -1
  120. pymammotion/aliyun/cloud_service.py +0 -65
  121. pymammotion/data/model/plan.py +0 -58
  122. pymammotion/data/state_manager.py +0 -130
  123. pymammotion/proto/basestation.py +0 -59
  124. pymammotion/proto/common.py +0 -12
  125. pymammotion/proto/dev_net.py +0 -381
  126. pymammotion/proto/luba_msg.py +0 -81
  127. pymammotion/proto/luba_mul.py +0 -76
  128. pymammotion/proto/mctrl_driver.py +0 -100
  129. pymammotion/proto/mctrl_nav.py +0 -660
  130. pymammotion/proto/mctrl_ota.py +0 -48
  131. pymammotion/proto/mctrl_pept.py +0 -41
  132. pymammotion/proto/mctrl_sys.py +0 -574
  133. pymammotion-0.2.62.dist-info/RECORD +0 -125
  134. /pymammotion/{http/_init_.py → bluetooth/model/__init__.py} +0 -0
  135. {pymammotion-0.2.62.dist-info → pymammotion-0.5.51.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,215 @@
1
+ from dataclasses import dataclass, field
2
+
3
+ from mashumaro.mixins.orjson import DataClassORJSONMixin
4
+
5
+ from pymammotion.proto import DevNet, LubaMsg, MctlDriver, MctlNav, MctlOta, MctlPept, MctlSys, SocMul
6
+
7
+
8
+ @dataclass
9
+ class RawMowerData:
10
+ raw: LubaMsg | None = field(default_factory=LubaMsg)
11
+
12
+ @classmethod
13
+ def from_raw(cls, raw: dict) -> "RawMowerData":
14
+ """Take in raw data to hold in the betterproto dataclass."""
15
+ return RawMowerData(raw=LubaMsg(**raw))
16
+
17
+ def update_raw(self, raw: dict) -> None:
18
+ """Update the raw LubaMsg data."""
19
+ self.raw = LubaMsg(**raw)
20
+
21
+ @property
22
+ def net(self):
23
+ """Will return a wrapped betterproto of net."""
24
+ return DevNetData(net=self.raw.net)
25
+
26
+ @property
27
+ def sys(self):
28
+ """Will return a wrapped betterproto of sys."""
29
+ return SysData(sys=self.raw.sys)
30
+
31
+ @property
32
+ def nav(self):
33
+ """Will return a wrapped betterproto of nav."""
34
+ return NavData(nav=self.raw.nav)
35
+
36
+ @property
37
+ def driver(self):
38
+ """Will return a wrapped betterproto of driver."""
39
+ return DriverData(driver=self.raw.driver)
40
+
41
+ @property
42
+ def mul(self):
43
+ """Will return a wrapped betterproto of mul."""
44
+ return MulData(mul=self.raw.mul)
45
+
46
+ @property
47
+ def ota(self):
48
+ """Will return a wrapped betterproto of ota."""
49
+ return OtaData(ota=self.raw.ota)
50
+
51
+ @property
52
+ def pept(self):
53
+ """Will return a wrapped betterproto of pept."""
54
+ return PeptData(pept=self.raw.pept)
55
+
56
+
57
+ @dataclass
58
+ class DevNetData(DataClassORJSONMixin):
59
+ """Wrapping class around LubaMsg to return a dataclass from the raw dict."""
60
+
61
+ net: dict
62
+
63
+ def __init__(self, net: DevNet) -> None:
64
+ if isinstance(net, dict):
65
+ self.net = net
66
+ else:
67
+ self.net = net.to_dict()
68
+
69
+ def __getattr__(self, item):
70
+ """Intercept call to get net in dict and return a betterproto dataclass."""
71
+ if self.net.get(item) is None:
72
+ return DevNet().__getattribute__(item)
73
+
74
+ if not isinstance(self.net.get(item), dict):
75
+ return self.net.get(item)
76
+
77
+ return DevNet().__getattribute__(item).from_dict(value=self.net.get(item))
78
+
79
+
80
+ @dataclass
81
+ class SysData(DataClassORJSONMixin):
82
+ """Wrapping class around LubaMsg to return a dataclass from the raw dict."""
83
+
84
+ sys: dict
85
+
86
+ def __init__(self, sys: MctlSys) -> None:
87
+ if isinstance(sys, dict):
88
+ self.sys = sys
89
+ else:
90
+ self.sys = sys.to_dict()
91
+
92
+ def __getattr__(self, item: str):
93
+ """Intercept call to get sys in dict and return a betterproto dataclass."""
94
+ if self.sys.get(item) is None:
95
+ return MctlSys().__getattribute__(item)
96
+
97
+ if not isinstance(self.sys.get(item), dict):
98
+ return self.sys.get(item)
99
+
100
+ return MctlSys().__getattribute__(item).from_dict(value=self.sys.get(item))
101
+
102
+
103
+ @dataclass
104
+ class NavData(DataClassORJSONMixin):
105
+ """Wrapping class around LubaMsg to return a dataclass from the raw dict."""
106
+
107
+ nav: dict
108
+
109
+ def __init__(self, nav: MctlNav) -> None:
110
+ if isinstance(nav, dict):
111
+ self.nav = nav
112
+ else:
113
+ self.nav = nav.to_dict()
114
+
115
+ def __getattr__(self, item: str):
116
+ """Intercept call to get nav in dict and return a betterproto dataclass."""
117
+ if self.nav.get(item) is None:
118
+ return MctlNav().__getattribute__(item)
119
+
120
+ if not isinstance(self.nav.get(item), dict):
121
+ return self.nav.get(item)
122
+
123
+ return MctlNav().__getattribute__(item).from_dict(value=self.nav.get(item))
124
+
125
+
126
+ @dataclass
127
+ class DriverData(DataClassORJSONMixin):
128
+ """Wrapping class around LubaMsg to return a dataclass from the raw dict."""
129
+
130
+ driver: dict
131
+
132
+ def __init__(self, driver: MctlDriver) -> None:
133
+ if isinstance(driver, dict):
134
+ self.driver = driver
135
+ else:
136
+ self.driver = driver.to_dict()
137
+
138
+ def __getattr__(self, item: str):
139
+ """Intercept call to get driver in dict and return a betterproto dataclass."""
140
+ if self.driver.get(item) is None:
141
+ return MctlDriver().__getattribute__(item)
142
+
143
+ if not isinstance(self.driver.get(item), dict):
144
+ return self.driver.get(item)
145
+
146
+ return MctlDriver().__getattribute__(item).from_dict(value=self.driver.get(item))
147
+
148
+
149
+ @dataclass
150
+ class MulData(DataClassORJSONMixin):
151
+ """Wrapping class around LubaMsg to return a dataclass from the raw dict."""
152
+
153
+ mul: dict
154
+
155
+ def __init__(self, mul: SocMul) -> None:
156
+ if isinstance(mul, dict):
157
+ self.mul = mul
158
+ else:
159
+ self.mul = mul.to_dict()
160
+
161
+ def __getattr__(self, item: str):
162
+ """Intercept call to get mul in dict and return a betterproto dataclass."""
163
+ if self.mul.get(item) is None:
164
+ return SocMul().__getattribute__(item)
165
+
166
+ if not isinstance(self.mul.get(item), dict):
167
+ return self.mul.get(item)
168
+
169
+ return SocMul().__getattribute__(item).from_dict(value=self.mul.get(item))
170
+
171
+
172
+ @dataclass
173
+ class OtaData(DataClassORJSONMixin):
174
+ """Wrapping class around LubaMsg to return a dataclass from the raw dict."""
175
+
176
+ ota: dict
177
+
178
+ def __init__(self, ota: MctlOta) -> None:
179
+ if isinstance(ota, dict):
180
+ self.ota = ota
181
+ else:
182
+ self.ota = ota.to_dict()
183
+
184
+ def __getattr__(self, item: str):
185
+ """Intercept call to get ota in dict and return a betterproto dataclass."""
186
+ if self.ota.get(item) is None:
187
+ return MctlOta().__getattribute__(item)
188
+
189
+ if not isinstance(self.ota.get(item), dict):
190
+ return self.ota.get(item)
191
+
192
+ return MctlOta().__getattribute__(item).from_dict(value=self.ota.get(item))
193
+
194
+
195
+ @dataclass
196
+ class PeptData(DataClassORJSONMixin):
197
+ """Wrapping class around LubaMsg to return a dataclass from the raw dict."""
198
+
199
+ pept: dict
200
+
201
+ def __init__(self, pept: MctlPept) -> None:
202
+ if isinstance(pept, dict):
203
+ self.pept = pept
204
+ else:
205
+ self.pept = pept.to_dict()
206
+
207
+ def __getattr__(self, item: str):
208
+ """Intercept call to get pept in dict and return a betterproto dataclass."""
209
+ if self.pept.get(item) is None:
210
+ return MctlPept().__getattribute__(item)
211
+
212
+ if not isinstance(self.pept.get(item), dict):
213
+ return self.pept.get(item)
214
+
215
+ return MctlPept().__getattribute__(item).from_dict(value=self.pept.get(item))
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
3
2
 
4
3
  from mashumaro.mixins.orjson import DataClassORJSONMixin
5
4
 
@@ -7,14 +6,14 @@ from mashumaro.mixins.orjson import DataClassORJSONMixin
7
6
  @dataclass
8
7
  class RegionData(DataClassORJSONMixin):
9
8
  def __init__(self) -> None:
10
- self.hash: Optional[int] = None
9
+ self.hash: int = 0
11
10
  self.action: int = 0
12
11
  self.current_frame: int = 0
13
- self.data_hash: Optional[int] = None
12
+ self.data_hash: int = 0
14
13
  self.data_len: int = 0
15
- self.p_hash_a: Optional[int] = None
16
- self.p_hash_b: Optional[int] = None
17
- self.path: Optional[list[list[float]]] = None
14
+ self.p_hash_a: int = 0
15
+ self.p_hash_b: int = 0
16
+ self.path: list[list[float]] | None = None
18
17
  self.pver: int = 0
19
18
  self.result: int = 0
20
19
  self.sub_cmd: int = 0
@@ -72,31 +71,31 @@ class RegionData(DataClassORJSONMixin):
72
71
  def set_current_frame(self, current_frame: int) -> None:
73
72
  self.current_frame = current_frame
74
73
 
75
- def get_path(self) -> Optional[list[list[float]]]:
74
+ def get_path(self) -> list[list[float]] | None:
76
75
  return self.path
77
76
 
78
77
  def set_path(self, path: list[list[float]]) -> None:
79
78
  self.path = path
80
79
 
81
- def get_hash(self) -> Optional[int]:
80
+ def get_hash(self) -> int | None:
82
81
  return self.hash
83
82
 
84
83
  def set_data_hash(self, data_hash: int) -> None:
85
84
  self.data_hash = data_hash
86
85
 
87
- def get_data_hash(self) -> Optional[int]:
86
+ def get_data_hash(self) -> int | None:
88
87
  return self.data_hash
89
88
 
90
89
  def set_p_hash_a(self, p_hash_a: int) -> None:
91
90
  self.p_hash_a = p_hash_a
92
91
 
93
- def get_p_hash_a(self) -> Optional[int]:
92
+ def get_p_hash_a(self) -> int | None:
94
93
  return self.p_hash_a
95
94
 
96
95
  def set_p_hash_b(self, p_hash_b: int) -> None:
97
96
  self.p_hash_b = p_hash_b
98
97
 
99
- def get_p_hash_b(self) -> Optional[int]:
98
+ def get_p_hash_b(self) -> int | None:
100
99
  return self.p_hash_b
101
100
 
102
101
  def __str__(self) -> str:
@@ -1,13 +1,27 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import dataclass, field
2
+ from enum import StrEnum
2
3
 
3
4
  from mashumaro.mixins.orjson import DataClassORJSONMixin
4
5
 
5
6
 
7
+ class NetUsedType(StrEnum):
8
+ NONE = "NONE"
9
+ WIFI = "WIFI"
10
+ MNET = "MNET"
11
+
12
+
6
13
  @dataclass
7
14
  class ConnectData(DataClassORJSONMixin):
8
15
  connect_type: int = 0
9
16
  ble_rssi: int = 0
10
17
  wifi_rssi: int = 0
18
+ link_type: int = 0
19
+ mnet_rssi: int = 0
20
+ mnet_inet: int = 0
21
+ used_net: str = "NONE"
22
+
23
+
24
+ # mnet_cfg:
11
25
 
12
26
 
13
27
  @dataclass
@@ -22,6 +36,16 @@ class MnetInfo(DataClassORJSONMixin):
22
36
  imei: str = ""
23
37
 
24
38
 
39
+ @dataclass
40
+ class LockStateT(DataClassORJSONMixin):
41
+ lock_state: int = 0
42
+
43
+
44
+ @dataclass
45
+ class VioSurvivalInfo(DataClassORJSONMixin):
46
+ vio_survival_distance: float = 0.0
47
+
48
+
25
49
  @dataclass
26
50
  class DeviceData(DataClassORJSONMixin):
27
51
  sys_status: int = 0
@@ -30,8 +54,11 @@ class DeviceData(DataClassORJSONMixin):
30
54
  sensor_status: int = 0
31
55
  last_status: int = 0
32
56
  sys_time_stamp: str = ""
33
- collector_status: CollectorStatus = field(default_factory=CollectorStatus)
57
+ vslam_status: int = 0
34
58
  mnet_info: MnetInfo = field(default_factory=MnetInfo)
59
+ vio_survival_info: VioSurvivalInfo = field(default_factory=VioSurvivalInfo)
60
+ collector_status: CollectorStatus = field(default_factory=CollectorStatus)
61
+ lock_state: LockStateT = field(default_factory=LockStateT)
35
62
 
36
63
 
37
64
  @dataclass
@@ -52,6 +79,31 @@ class LocationData(DataClassORJSONMixin):
52
79
  bol_hash: str = ""
53
80
 
54
81
 
82
+ @dataclass
83
+ class BladeUsed(DataClassORJSONMixin):
84
+ blade_used_time: int = 0
85
+ blade_used_warn_time: int = 0
86
+
87
+
88
+ @dataclass
89
+ class Maintain(DataClassORJSONMixin):
90
+ blade_used_time: BladeUsed = field(default_factory=BladeUsed)
91
+ mileage: int = 0
92
+ work_time: int = 0
93
+ bat_cycles: int = 0
94
+
95
+
96
+ @dataclass
97
+ class VisionInfo(DataClassORJSONMixin):
98
+ x: float = 0.0
99
+ y: float = 0.0
100
+ heading: float = 0.0
101
+ vio_state: int = 0
102
+ brightness: int = 0
103
+ detect_feature_num: int = 0
104
+ track_feature_num: int = 0
105
+
106
+
55
107
  @dataclass
56
108
  class WorkData(DataClassORJSONMixin):
57
109
  path: int = 0
@@ -80,6 +132,8 @@ class WorkData(DataClassORJSONMixin):
80
132
  class ReportData(DataClassORJSONMixin):
81
133
  connect: ConnectData = field(default_factory=ConnectData)
82
134
  dev: DeviceData = field(default_factory=DeviceData)
135
+ maintenance: Maintain = field(default_factory=Maintain)
136
+ vision_info: VisionInfo = field(default_factory=VisionInfo)
83
137
  rtk: RTKData = field(default_factory=RTKData)
84
138
  locations: list[LocationData] = field(default_factory=list)
85
139
  work: WorkData = field(default_factory=WorkData)
@@ -89,8 +143,10 @@ class ReportData(DataClassORJSONMixin):
89
143
  if data.get("locations") is not None:
90
144
  locations = [LocationData.from_dict(loc) for loc in data.get("locations", [])]
91
145
 
92
- self.connect = ConnectData.from_dict(data.get("connect", asdict(self.connect)))
93
- self.dev = DeviceData.from_dict(data.get("dev", asdict(self.dev)))
94
- self.rtk = RTKData.from_dict(data.get("rtk", asdict(self.rtk)))
146
+ self.connect = ConnectData.from_dict(data.get("connect", self.connect.to_dict()))
147
+ self.dev = DeviceData.from_dict(data.get("dev", self.dev.to_dict()))
148
+ self.rtk = RTKData.from_dict(data.get("rtk", self.rtk.to_dict()))
149
+ self.maintenance = Maintain.from_dict(data.get("maintain", self.maintenance.to_dict()))
150
+ self.vision_info = VisionInfo.from_dict(data.get("vio_to_app_info", VisionInfo().to_dict()))
95
151
  self.locations = locations
96
- self.work = WorkData.from_dict(data.get("work", asdict(self.work)))
152
+ self.work = WorkData.from_dict(data.get("work", self.work.to_dict()))
@@ -0,0 +1,27 @@
1
+ """bidire_reqconver_path as a model."""
2
+
3
+ from dataclasses import dataclass, field
4
+
5
+ from mashumaro.mixins.orjson import DataClassORJSONMixin
6
+
7
+
8
+ @dataclass
9
+ class CurrentTaskSettings(DataClassORJSONMixin):
10
+ pver: int = 0
11
+ job_id: int = 0
12
+ job_ver: int = 0
13
+ job_mode: int = 0
14
+ sub_cmd: int = 0
15
+ edge_mode: int = 0
16
+ knife_height: int = 0
17
+ channel_width: int = 0
18
+ ultra_wave: int = 0
19
+ channel_mode: int = 0
20
+ toward: int = 0
21
+ speed: float = 0.0
22
+ zone_hashs: list[int] = field(default_factory=list)
23
+ path_hash: int = 0
24
+ reserved: str = ""
25
+ result: int = 0
26
+ toward_mode: int = 0
27
+ toward_included_angle: int = 0