pymammotion 0.2.95__py3-none-any.whl → 0.2.96__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/http/http.py +4 -3
- pymammotion/utility/constant/device_constant.py +20 -20
- {pymammotion-0.2.95.dist-info → pymammotion-0.2.96.dist-info}/METADATA +1 -1
- {pymammotion-0.2.95.dist-info → pymammotion-0.2.96.dist-info}/RECORD +6 -6
- {pymammotion-0.2.95.dist-info → pymammotion-0.2.96.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.95.dist-info → pymammotion-0.2.96.dist-info}/WHEEL +0 -0
pymammotion/http/http.py
CHANGED
@@ -21,7 +21,7 @@ class MammotionHTTP:
|
|
21
21
|
self.msg = response.msg
|
22
22
|
self.code = response.code
|
23
23
|
|
24
|
-
async def get_all_error_codes(self) ->
|
24
|
+
async def get_all_error_codes(self) -> dict[str, ErrorInfo]:
|
25
25
|
async with ClientSession(MAMMOTION_API_DOMAIN) as session:
|
26
26
|
async with session.post(
|
27
27
|
"/user-server/v1/code/record/export-data",
|
@@ -29,9 +29,10 @@ class MammotionHTTP:
|
|
29
29
|
) as resp:
|
30
30
|
data = await resp.json()
|
31
31
|
reader = csv.DictReader(data.get("data", "").split("\n"), delimiter=",")
|
32
|
-
codes =
|
32
|
+
codes = dict()
|
33
33
|
for row in reader:
|
34
|
-
|
34
|
+
error_info = ErrorInfo(**cast(dict, row))
|
35
|
+
codes[error_info.code] = error_info
|
35
36
|
return codes
|
36
37
|
|
37
38
|
async def oauth_check(self) -> None:
|
@@ -186,30 +186,29 @@ class SystemTardStateTunnel:
|
|
186
186
|
|
187
187
|
|
188
188
|
class WorkMode:
|
189
|
-
MODE_BOUNDARY_JUMP = 38
|
190
|
-
MODE_CHANNEL_DRAW = 34
|
191
|
-
MODE_CHARGING = 15
|
192
|
-
MODE_DISABLE = 8
|
193
|
-
MODE_EDIT_BOUNDARY = 36
|
194
|
-
MODE_ERASER_DRAW = 35
|
195
|
-
MODE_INITIALIZATION = 10
|
196
|
-
MODE_JOB_DRAW = 31
|
197
|
-
MODE_LOCATION_ERROR = 37
|
198
|
-
MODE_LOCK = 17
|
199
|
-
MODE_MANUAL_MOWING = 20
|
200
189
|
MODE_NOT_ACTIVE = 0
|
201
|
-
MODE_OBSTACLE_DRAW = 32
|
202
|
-
MODE_OFFLINE = 2
|
203
190
|
MODE_ONLINE = 1
|
204
|
-
|
205
|
-
|
206
|
-
|
191
|
+
MODE_OFFLINE = 2
|
192
|
+
MODE_DISABLE = 8
|
193
|
+
MODE_INITIALIZATION = 10
|
207
194
|
MODE_READY = 11
|
195
|
+
MODE_WORKING = 13
|
208
196
|
MODE_RETURNING = 14
|
209
|
-
|
210
|
-
MODE_UPDATE_SUCCESS = 22
|
197
|
+
MODE_CHARGING = 15
|
211
198
|
MODE_UPDATING = 16
|
212
|
-
|
199
|
+
MODE_LOCK = 17
|
200
|
+
MODE_PAUSE = 19
|
201
|
+
MODE_MANUAL_MOWING = 20
|
202
|
+
MODE_UPDATE_SUCCESS = 22
|
203
|
+
MODE_OTA_UPGRADE_FAIL = 23
|
204
|
+
MODE_JOB_DRAW = 31
|
205
|
+
MODE_OBSTACLE_DRAW = 32
|
206
|
+
MODE_CHANNEL_DRAW = 34
|
207
|
+
MODE_ERASER_DRAW = 35
|
208
|
+
MODE_EDIT_BOUNDARY = 36
|
209
|
+
MODE_LOCATION_ERROR = 37
|
210
|
+
MODE_BOUNDARY_JUMP = 38
|
211
|
+
MODE_CHARGING_PAUSE = 39
|
213
212
|
|
214
213
|
|
215
214
|
def device_connection(value: int, mnet_type: str) -> str:
|
@@ -262,6 +261,7 @@ def device_mode(value: int) -> str:
|
|
262
261
|
36: "MODE_EDIT_BOUNDARY",
|
263
262
|
37: "MODE_LOCATION_ERROR",
|
264
263
|
38: "MODE_BOUNDARY_JUMP",
|
264
|
+
39: "MODE_CHARGING_PAUSE",
|
265
265
|
}
|
266
266
|
return modes.get(value, "Invalid mode")
|
267
267
|
|
@@ -272,7 +272,7 @@ class PosType(IntEnum):
|
|
272
272
|
AREA_BORDER_ON = 7
|
273
273
|
AREA_INSIDE = 1
|
274
274
|
AREA_OUT = 0
|
275
|
-
|
275
|
+
CHANNEL_AREA_OVERLAP = 9
|
276
276
|
CHANNEL_ON = 3
|
277
277
|
CHARGE_ON = 5
|
278
278
|
DUMPING_AREA_INSIDE = 8
|
@@ -44,7 +44,7 @@ pymammotion/data/state_manager.py,sha256=vtBT28-5DY58hJMi_kqOUKnOq6rJ4fx1zX8yU7N
|
|
44
44
|
pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
|
45
45
|
pymammotion/event/event.py,sha256=bj2RirSIRyBs0QvkcrOtwZWUX_8F3m1sySuHVyKmZLs,2143
|
46
46
|
pymammotion/http/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
47
|
-
pymammotion/http/http.py,sha256=
|
47
|
+
pymammotion/http/http.py,sha256=ar-m05YI124aDrKX7L3lLfX7EB2RwVamxL5J1BZjhy0,3626
|
48
48
|
pymammotion/http/model/http.py,sha256=_hHqe9IfKDukUYKQDrZb_Tt_9rd5BNN1WKsaGIjsexM,1876
|
49
49
|
pymammotion/mammotion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
50
|
pymammotion/mammotion/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -111,7 +111,7 @@ pymammotion/proto/mctrl_sys_pb2.py,sha256=DYemb514mlC7c27t-k1YqqBif0xxhLmnIWk8rX
|
|
111
111
|
pymammotion/proto/mctrl_sys_pb2.pyi,sha256=Dj_1UM86kZ5MfcVyNC76Z0gKrfl5YFsVWP2b-bKoZvk,38912
|
112
112
|
pymammotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
113
113
|
pymammotion/utility/constant/__init__.py,sha256=tcY0LDeD-qDDHx2LKt55KOyv9ZI0UfCNM6fknLCmm8s,110
|
114
|
-
pymammotion/utility/constant/device_constant.py,sha256=
|
114
|
+
pymammotion/utility/constant/device_constant.py,sha256=frRk_ie9-D7963NRQXfG_GusoVBQrW0Mb6Gziu7_09k,7380
|
115
115
|
pymammotion/utility/conversions.py,sha256=v3YICy0zZwwBBzrUZgabI7GRfiDBnkiAX2qdtk3NxOY,89
|
116
116
|
pymammotion/utility/datatype_converter.py,sha256=SPM_HuaaD_XOawlqEnA8qlRRZXGba3WjA8kGOZgeBlQ,4284
|
117
117
|
pymammotion/utility/device_type.py,sha256=xOgfIhOkzgcAtoKtlhlB1q8FpiKe1rVVV5BvN7K7zYc,9433
|
@@ -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.
|
123
|
-
pymammotion-0.2.
|
124
|
-
pymammotion-0.2.
|
125
|
-
pymammotion-0.2.
|
122
|
+
pymammotion-0.2.96.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
123
|
+
pymammotion-0.2.96.dist-info/METADATA,sha256=ZslsTp5rdEyPQv7K1SD3qk-WyeLa3cjo2laLDoTZehc,3896
|
124
|
+
pymammotion-0.2.96.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
125
|
+
pymammotion-0.2.96.dist-info/RECORD,,
|
File without changes
|
File without changes
|