pymammotion 0.2.94__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/__init__.py +4 -2
- pymammotion/http/http.py +4 -3
- pymammotion/mammotion/commands/messages/network.py +62 -48
- pymammotion/mammotion/commands/messages/system.py +2 -4
- pymammotion/mammotion/devices/mammotion.py +10 -9
- pymammotion/mammotion/devices/mammotion_bluetooth.py +6 -6
- pymammotion/mammotion/devices/mammotion_cloud.py +2 -0
- pymammotion/utility/constant/device_constant.py +20 -20
- {pymammotion-0.2.94.dist-info → pymammotion-0.2.96.dist-info}/METADATA +1 -1
- {pymammotion-0.2.94.dist-info → pymammotion-0.2.96.dist-info}/RECORD +12 -12
- {pymammotion-0.2.94.dist-info → pymammotion-0.2.96.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.94.dist-info → pymammotion-0.2.96.dist-info}/WHEEL +0 -0
pymammotion/__init__.py
CHANGED
@@ -17,10 +17,12 @@ from pymammotion.http.http import MammotionHTTP, connect_http
|
|
17
17
|
# TODO make a working device that will work outside HA too.
|
18
18
|
from pymammotion.mqtt import MammotionMQTT
|
19
19
|
|
20
|
-
__all__ = ["MammotionBLE", "MammotionHTTP", "connect_http", "MammotionMQTT"]
|
21
|
-
|
22
20
|
logger = logging.getLogger(__name__)
|
23
21
|
|
22
|
+
|
23
|
+
__all__ = ["MammotionBLE", "MammotionHTTP", "connect_http", "MammotionMQTT", "logger"]
|
24
|
+
|
25
|
+
|
24
26
|
# TODO provide interface to pick between mqtt/cloud/bluetooth
|
25
27
|
|
26
28
|
if __name__ == "__main__":
|
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:
|
@@ -5,8 +5,24 @@ from abc import ABC
|
|
5
5
|
from pymammotion import logger
|
6
6
|
from pymammotion.mammotion.commands.abstract_message import AbstractMessage
|
7
7
|
from pymammotion.mammotion.commands.messages.navigation import MessageNavigation
|
8
|
-
from pymammotion.proto import
|
9
|
-
|
8
|
+
from pymammotion.proto.dev_net import (
|
9
|
+
DevNet,
|
10
|
+
DrvDebugDdsZmq,
|
11
|
+
DrvDevInfoReq,
|
12
|
+
DrvDevInfoReqId,
|
13
|
+
DrvUploadFileCancel,
|
14
|
+
DrvUploadFileReq,
|
15
|
+
DrvUploadFileToAppReq,
|
16
|
+
DrvWifiList,
|
17
|
+
DrvWifiSet,
|
18
|
+
DrvWifiUpload,
|
19
|
+
GetNetworkInfoReq,
|
20
|
+
IotConctrlType,
|
21
|
+
MnetCfg,
|
22
|
+
NetType,
|
23
|
+
SetMnetCfgReq,
|
24
|
+
)
|
25
|
+
from pymammotion.proto.luba_msg import LubaMsg, MsgAttr, MsgCmdType, MsgDevice
|
10
26
|
|
11
27
|
|
12
28
|
class MessageNetwork(AbstractMessage, ABC):
|
@@ -14,11 +30,11 @@ class MessageNetwork(AbstractMessage, ABC):
|
|
14
30
|
|
15
31
|
@staticmethod
|
16
32
|
def send_order_msg_net(build: DevNet) -> bytes:
|
17
|
-
luba_msg =
|
18
|
-
msgtype=
|
19
|
-
sender=
|
20
|
-
rcver=
|
21
|
-
msgattr=
|
33
|
+
luba_msg = LubaMsg(
|
34
|
+
msgtype=MsgCmdType.MSG_CMD_TYPE_ESP,
|
35
|
+
sender=MsgDevice.DEV_MOBILEAPP,
|
36
|
+
rcver=MsgDevice.DEV_COMM_ESP,
|
37
|
+
msgattr=MsgAttr.MSG_ATTR_REQ,
|
22
38
|
seqs=1,
|
23
39
|
version=1,
|
24
40
|
subtype=1,
|
@@ -29,38 +45,38 @@ class MessageNetwork(AbstractMessage, ABC):
|
|
29
45
|
return luba_msg.SerializeToString()
|
30
46
|
|
31
47
|
def send_todev_ble_sync(self, sync_type: int) -> bytes:
|
32
|
-
comm_esp =
|
48
|
+
comm_esp = DevNet(todev_ble_sync=sync_type)
|
33
49
|
return self.send_order_msg_net(comm_esp)
|
34
50
|
|
35
51
|
def get_device_base_info(self) -> bytes:
|
36
|
-
net =
|
37
|
-
net.todev_devinfo_req.req_ids.
|
52
|
+
net = DevNet(todev_devinfo_req=DrvDevInfoReq())
|
53
|
+
net.todev_devinfo_req.req_ids.append(DrvDevInfoReqId(id=1, type=6))
|
38
54
|
|
39
55
|
return self.send_order_msg_net(net)
|
40
56
|
|
41
57
|
def get_device_version_main(self) -> bytes:
|
42
|
-
net =
|
58
|
+
net = DevNet(todev_devinfo_req=DrvDevInfoReq())
|
43
59
|
|
44
60
|
for i in range(1, 8):
|
45
61
|
if i == 1:
|
46
|
-
net.todev_devinfo_req.req_ids.
|
47
|
-
net.todev_devinfo_req.req_ids.
|
62
|
+
net.todev_devinfo_req.req_ids.append(DrvDevInfoReqId(id=i, type=6))
|
63
|
+
net.todev_devinfo_req.req_ids.append(DrvDevInfoReqId(id=i, type=3))
|
48
64
|
|
49
65
|
return self.send_order_msg_net(net)
|
50
66
|
|
51
67
|
def get_4g_module_info(self) -> bytes:
|
52
|
-
build =
|
68
|
+
build = DevNet(todev_get_mnet_cfg_req=DevNet().todev_get_mnet_cfg_req)
|
53
69
|
logger.debug("Send command -- Get device 4G network module information")
|
54
70
|
return self.send_order_msg_net(build)
|
55
71
|
|
56
72
|
def get_4g_info(self) -> bytes:
|
57
|
-
build =
|
73
|
+
build = DevNet(todev_mnet_info_req=DevNet().todev_mnet_info_req)
|
58
74
|
logger.debug("Send command -- Get device 4G network information")
|
59
75
|
return self.send_order_msg_net(build)
|
60
76
|
|
61
77
|
def set_zmq_enable(self) -> bytes:
|
62
|
-
build =
|
63
|
-
todev_set_dds2zmq=
|
78
|
+
build = DevNet(
|
79
|
+
todev_set_dds2zmq=DrvDebugDdsZmq(
|
64
80
|
is_enable=True,
|
65
81
|
rx_topic_name="perception_post_result",
|
66
82
|
tx_zmq_url="tcp://0.0.0.0:5555",
|
@@ -69,8 +85,8 @@ class MessageNetwork(AbstractMessage, ABC):
|
|
69
85
|
logger.debug("Send command -- Set vision ZMQ to enable")
|
70
86
|
return self.send_order_msg_net(build)
|
71
87
|
|
72
|
-
def set_iot_setting(self, iot_control_type:
|
73
|
-
build =
|
88
|
+
def set_iot_setting(self, iot_control_type: IotConctrlType) -> bytes:
|
89
|
+
build = DevNet(todev_set_iot_offline_req=iot_control_type)
|
74
90
|
logger.debug("Send command -- Device re-online")
|
75
91
|
return self.send_order_msg_net(build)
|
76
92
|
|
@@ -83,18 +99,18 @@ class MessageNetwork(AbstractMessage, ABC):
|
|
83
99
|
number: int,
|
84
100
|
type: int,
|
85
101
|
) -> bytes:
|
86
|
-
build =
|
87
|
-
|
102
|
+
build = DrvUploadFileToAppReq(
|
103
|
+
biz_id=request_id,
|
88
104
|
operation=operation,
|
89
|
-
|
90
|
-
|
105
|
+
server_ip=server_ip,
|
106
|
+
server_port=server_port,
|
91
107
|
num=number,
|
92
108
|
type=type,
|
93
109
|
)
|
94
110
|
logger.debug(
|
95
111
|
f"Send log====Feedback====Command======requestID:{request_id} operation:{operation} serverIp:{server_ip} type:{type}"
|
96
112
|
)
|
97
|
-
return self.send_order_msg_net(
|
113
|
+
return self.send_order_msg_net(DevNet(todev_ble_sync=1, todev_uploadfile_req=build))
|
98
114
|
|
99
115
|
def set_device_socket_request(
|
100
116
|
self,
|
@@ -106,51 +122,49 @@ class MessageNetwork(AbstractMessage, ABC):
|
|
106
122
|
type: int,
|
107
123
|
) -> bytes:
|
108
124
|
"""Set device socket request (bluetooth only)."""
|
109
|
-
build =
|
110
|
-
|
125
|
+
build = DrvUploadFileToAppReq(
|
126
|
+
biz_id=request_id,
|
111
127
|
operation=operation,
|
112
|
-
|
113
|
-
|
128
|
+
server_ip=server_ip,
|
129
|
+
server_port=server_port,
|
114
130
|
num=number,
|
115
131
|
type=type,
|
116
132
|
)
|
117
133
|
logger.debug(
|
118
134
|
f"Send log====Feedback====Command======requestID:{request_id} operation:{operation} serverIp:{server_ip} type:{type}"
|
119
135
|
)
|
120
|
-
return self.send_order_msg_net(
|
136
|
+
return self.send_order_msg_net(DevNet(todev_ble_sync=1, todev_uploadfile_req=build))
|
121
137
|
|
122
138
|
def get_device_log_info(self, biz_id: str, type: int, log_url: str) -> bytes:
|
123
139
|
"""Get device log info (bluetooth only)."""
|
124
140
|
return self.send_order_msg_net(
|
125
|
-
|
141
|
+
DevNet(
|
126
142
|
todev_ble_sync=1,
|
127
|
-
todev_req_log_info=
|
128
|
-
|
143
|
+
todev_req_log_info=DrvUploadFileReq(
|
144
|
+
biz_id=biz_id,
|
129
145
|
type=type,
|
130
146
|
url=log_url,
|
131
147
|
num=0,
|
132
|
-
|
148
|
+
user_id="", # TODO supply user id
|
133
149
|
),
|
134
150
|
)
|
135
151
|
)
|
136
152
|
|
137
153
|
def cancel_log_update(self, biz_id: str) -> bytes:
|
138
154
|
"""Cancel log update (bluetooth only)."""
|
139
|
-
return self.send_order_msg_net(
|
140
|
-
dev_net_pb2.DevNet(todev_log_data_cancel=dev_net_pb2.DrvUploadFileCancel(bizId=biz_id))
|
141
|
-
)
|
155
|
+
return self.send_order_msg_net(DevNet(todev_log_data_cancel=DrvUploadFileCancel(biz_id=biz_id)))
|
142
156
|
|
143
157
|
def get_device_network_info(self) -> bytes:
|
144
|
-
build =
|
158
|
+
build = DevNet(todev_networkinfo_req=GetNetworkInfoReq(req_ids=1))
|
145
159
|
logger.debug("Send command - get device network information")
|
146
160
|
return self.send_order_msg_net(build)
|
147
161
|
|
148
162
|
def set_device_4g_enable_status(self, new_4g_status: bool) -> bytes:
|
149
|
-
build =
|
163
|
+
build = DevNet(
|
150
164
|
todev_ble_sync=1,
|
151
|
-
todev_set_mnet_cfg_req=
|
152
|
-
cfg=
|
153
|
-
type=
|
165
|
+
todev_set_mnet_cfg_req=SetMnetCfgReq(
|
166
|
+
cfg=MnetCfg(
|
167
|
+
type=NetType.NET_TYPE_WIFI,
|
154
168
|
inet_enable=new_4g_status,
|
155
169
|
mnet_enable=new_4g_status,
|
156
170
|
)
|
@@ -161,17 +175,17 @@ class MessageNetwork(AbstractMessage, ABC):
|
|
161
175
|
return self.send_order_msg_net(build)
|
162
176
|
|
163
177
|
def set_device_wifi_enable_status(self, new_wifi_status: bool) -> bytes:
|
164
|
-
build =
|
178
|
+
build = DevNet(
|
165
179
|
todev_ble_sync=1,
|
166
|
-
|
180
|
+
todev__wifi__configuration=DrvWifiSet(config_param=4, wifi_enable=new_wifi_status),
|
167
181
|
)
|
168
182
|
logger.debug(f"szNetwork: Send command - set network (on/off status). newWifiStatus={new_wifi_status}")
|
169
183
|
return self.send_order_msg_net(build)
|
170
184
|
|
171
185
|
def wifi_connectinfo_update(self) -> bytes:
|
172
|
-
build =
|
186
|
+
build = DevNet(
|
173
187
|
todev_ble_sync=1,
|
174
|
-
|
188
|
+
todev__wifi_msg_upload=DrvWifiUpload(wifi_msg_upload=1),
|
175
189
|
)
|
176
190
|
logger.debug("Send command - get Wifi connection information")
|
177
191
|
return self.send_order_msg_net(build)
|
@@ -182,14 +196,14 @@ class MessageNetwork(AbstractMessage, ABC):
|
|
182
196
|
# 68, hash_map)) # ToDo: Fix this
|
183
197
|
|
184
198
|
def get_record_wifi_list(self) -> bytes:
|
185
|
-
build =
|
199
|
+
build = DevNet(todev_ble_sync=1, todev__wifi_list_upload=DrvWifiList())
|
186
200
|
logger.debug("Send command - get memorized WiFi list upload command")
|
187
201
|
return self.send_order_msg_net(build)
|
188
202
|
|
189
203
|
def close_clear_connect_current_wifi(self, ssid: str, status: int) -> bytes:
|
190
|
-
build =
|
204
|
+
build = DevNet(
|
191
205
|
todev_ble_sync=1,
|
192
|
-
|
206
|
+
todev__wifi__configuration=DrvWifiSet(config_param=status, confssid=ssid),
|
193
207
|
)
|
194
208
|
logger.debug(
|
195
209
|
f"Send command - set network (disconnect, direct connect, forget, no operation reconnect) operation command (downlink ssid={ssid}, status={status})"
|
@@ -71,9 +71,7 @@ class MessageSystem(AbstractMessage, ABC):
|
|
71
71
|
return self.send_order_msg_sys(mctlsys)
|
72
72
|
|
73
73
|
def get_device_product_model(self):
|
74
|
-
return self.send_order_msg_sys(MctlSys(device_product_type_info=DeviceProductTypeInfoT(
|
75
|
-
result=1
|
76
|
-
)))
|
74
|
+
return self.send_order_msg_sys(MctlSys(device_product_type_info=DeviceProductTypeInfoT(result=1)))
|
77
75
|
|
78
76
|
def read_and_set_sidelight(self, is_sidelight: bool, operate: int):
|
79
77
|
"""Read state of sidelight as well as set it."""
|
@@ -248,7 +246,7 @@ class MessageSystem(AbstractMessage, ABC):
|
|
248
246
|
)
|
249
247
|
)
|
250
248
|
logger.debug(f"Send command==== IOT slim data Act {
|
251
|
-
build.todev_report_cfg.act}
|
249
|
+
build.todev_report_cfg.act}")
|
252
250
|
return self.send_order_msg_sys_legacy(build)
|
253
251
|
|
254
252
|
def get_report_cfg_stop(self, timeout: int = 10000, period: int = 1000, no_change_period: int = 1000):
|
@@ -67,7 +67,7 @@ class MammotionMixedDeviceManager:
|
|
67
67
|
|
68
68
|
def has_queued_commands(self) -> bool:
|
69
69
|
if self.has_cloud() and self.preference == ConnectionPreference.WIFI:
|
70
|
-
return not self.cloud().
|
70
|
+
return not self.cloud().mqtt.command_queue.empty()
|
71
71
|
else:
|
72
72
|
return not self.ble().command_queue.empty()
|
73
73
|
|
@@ -88,7 +88,8 @@ class MammotionMixedDeviceManager:
|
|
88
88
|
self._ble_device = ble_device
|
89
89
|
|
90
90
|
def replace_mqtt(self, mqtt: MammotionCloud) -> None:
|
91
|
-
self._cloud_device.
|
91
|
+
device = self._cloud_device.device
|
92
|
+
self._cloud_device = MammotionBaseCloudDevice(mqtt, cloud_device=device, state_manager=self._state_manager)
|
92
93
|
|
93
94
|
def has_cloud(self) -> bool:
|
94
95
|
return self._cloud_device is not None
|
@@ -120,7 +121,7 @@ class MammotionDevices:
|
|
120
121
|
should_disconnect = {
|
121
122
|
device
|
122
123
|
for key, device in self.devices.items()
|
123
|
-
if device.cloud() is not None and device.cloud().
|
124
|
+
if device.cloud() is not None and device.cloud().mqtt == device_for_removal.cloud().mqtt
|
124
125
|
}
|
125
126
|
if len(should_disconnect) == 0:
|
126
127
|
await loop.run_in_executor(None, device_for_removal.cloud().mqtt.disconnect)
|
@@ -153,9 +154,9 @@ class Mammotion:
|
|
153
154
|
devices = MammotionDevices()
|
154
155
|
mqtt_list: dict[str, MammotionCloud] = dict()
|
155
156
|
|
156
|
-
_instance = None
|
157
|
+
_instance: Mammotion = None
|
157
158
|
|
158
|
-
def __new__(cls, *args, **kwargs):
|
159
|
+
def __new__(cls, *args: Any, **kwargs: Any):
|
159
160
|
if not cls._instance:
|
160
161
|
cls._instance = super().__new__(cls)
|
161
162
|
return cls._instance
|
@@ -181,9 +182,9 @@ class Mammotion:
|
|
181
182
|
|
182
183
|
async def initiate_cloud_connection(self, account: str, cloud_client: CloudIOTGateway) -> None:
|
183
184
|
loop = asyncio.get_running_loop()
|
184
|
-
if self.mqtt_list.get(account)
|
185
|
-
if
|
186
|
-
await loop.run_in_executor(None,
|
185
|
+
if mqtt := self.mqtt_list.get(account):
|
186
|
+
if mqtt.is_connected():
|
187
|
+
await loop.run_in_executor(None, mqtt.disconnect)
|
187
188
|
|
188
189
|
mammotion_cloud = MammotionCloud(
|
189
190
|
MammotionMQTT(
|
@@ -221,7 +222,7 @@ class Mammotion:
|
|
221
222
|
mower_device.replace_mqtt(mqtt_client)
|
222
223
|
|
223
224
|
def set_disconnect_strategy(self, disconnect: bool) -> None:
|
224
|
-
for device_name, device in self.devices.devices:
|
225
|
+
for device_name, device in self.devices.devices.items():
|
225
226
|
if device.ble() is not None:
|
226
227
|
ble_device: MammotionBaseBLEDevice = device.ble()
|
227
228
|
ble_device.set_disconnect_strategy(disconnect)
|
@@ -76,7 +76,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
76
76
|
self._ble_sync_task = None
|
77
77
|
self._prev_notification = None
|
78
78
|
self._interface = f"hci{interface}"
|
79
|
-
self.
|
79
|
+
self.ble_device = device
|
80
80
|
self._client: BleakClientWithServiceCache | None = None
|
81
81
|
self._read_char: BleakGATTCharacteristic | int | str | UUID = 0
|
82
82
|
self._write_char: BleakGATTCharacteristic | int | str | UUID = 0
|
@@ -94,7 +94,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
94
94
|
|
95
95
|
def update_device(self, device: BLEDevice) -> None:
|
96
96
|
"""Update the BLE device."""
|
97
|
-
self.
|
97
|
+
self.ble_device = device
|
98
98
|
|
99
99
|
async def _ble_sync(self) -> None:
|
100
100
|
if self._client is not None and self._client.is_connected:
|
@@ -215,7 +215,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
215
215
|
@property
|
216
216
|
def name(self) -> str:
|
217
217
|
"""Return device name."""
|
218
|
-
return f"{self.
|
218
|
+
return f"{self.ble_device.name} ({self.ble_device.address})"
|
219
219
|
|
220
220
|
@property
|
221
221
|
def rssi(self) -> int:
|
@@ -254,11 +254,11 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
254
254
|
_LOGGER.debug("%s: Connecting; RSSI: %s", self.name, self.rssi)
|
255
255
|
client: BleakClientWithServiceCache = await establish_connection(
|
256
256
|
BleakClientWithServiceCache,
|
257
|
-
self.
|
257
|
+
self.ble_device,
|
258
258
|
self.name,
|
259
259
|
self._disconnected,
|
260
260
|
max_attempts=10,
|
261
|
-
ble_device_callback=lambda: self.
|
261
|
+
ble_device_callback=lambda: self.ble_device,
|
262
262
|
)
|
263
263
|
_LOGGER.debug("%s: Connected; RSSI: %s", self.name, self.rssi)
|
264
264
|
self._client = client
|
@@ -376,7 +376,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
376
376
|
|
377
377
|
def get_address(self) -> str:
|
378
378
|
"""Return address of device."""
|
379
|
-
return self.
|
379
|
+
return self.ble_device.address
|
380
380
|
|
381
381
|
def _resolve_characteristics(self, services: BleakGATTServiceCollection) -> None:
|
382
382
|
"""Resolve characteristics."""
|
@@ -102,6 +102,7 @@ class MammotionCloud:
|
|
102
102
|
try:
|
103
103
|
notify_msg = await future.async_get(timeout)
|
104
104
|
except asyncio.TimeoutError:
|
105
|
+
_LOGGER.debug("command_locked TimeoutError")
|
105
106
|
notify_msg = b""
|
106
107
|
|
107
108
|
_LOGGER.debug("%s: Message received", iot_id)
|
@@ -278,6 +279,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
|
|
278
279
|
self.state_manager.properties(event)
|
279
280
|
|
280
281
|
async def _parse_message_for_device(self, event: ThingEventMessage) -> None:
|
282
|
+
_LOGGER.debug("_parse_message_for_device")
|
281
283
|
params = event.params
|
282
284
|
new_msg = LubaMsg()
|
283
285
|
if event.params.iotId != self.iot_id:
|
@@ -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
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pymammotion/__init__.py,sha256=
|
1
|
+
pymammotion/__init__.py,sha256=BcwrItywpSECTxrTPwEuBExi_ekOrG2M2tbphuotIlE,1617
|
2
2
|
pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
|
3
3
|
pymammotion/aliyun/cloud_gateway.py,sha256=NDrDFEI86I-fv2wJL2PWsYXbty4SrltGBRh3_Ykpw5o,25769
|
4
4
|
pymammotion/aliyun/cloud_service.py,sha256=px7dUKow5Z7VyebjYzuKkzkm77XbUXYiFiYO_2e-UQ0,2207
|
@@ -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
|
@@ -54,17 +54,17 @@ pymammotion/mammotion/commands/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5J
|
|
54
54
|
pymammotion/mammotion/commands/messages/driver.py,sha256=DlOAC_yi1ycO5hKr5rfCpLmrqao6Mb6Fv1JWwMISnKE,3766
|
55
55
|
pymammotion/mammotion/commands/messages/media.py,sha256=l-m4l2Vp1ZOHPHyJTceuLaLvdgHOEfmykkbDncCDUI4,1359
|
56
56
|
pymammotion/mammotion/commands/messages/navigation.py,sha256=Z6RQK-pMh8o7_K_1yTENx3lkNBFQTU_ojunolSre0oM,23241
|
57
|
-
pymammotion/mammotion/commands/messages/network.py,sha256=
|
57
|
+
pymammotion/mammotion/commands/messages/network.py,sha256=AErasUL7U4lbFKRJPVzUZMHegP5K2Jo9wGmeWruOtUg,7623
|
58
58
|
pymammotion/mammotion/commands/messages/ota.py,sha256=g937HT_-OQXV6A3zUiZ53b45cOX6y-rzs5m-4b0IcTk,1473
|
59
|
-
pymammotion/mammotion/commands/messages/system.py,sha256=
|
59
|
+
pymammotion/mammotion/commands/messages/system.py,sha256=QX13P3to0c4DjPXe46soZ05GYmR0WToCE8zb6rQjmaA,13245
|
60
60
|
pymammotion/mammotion/commands/messages/video.py,sha256=xili9khz4Op5NwjXfvIkeRYzQlQPIf8o8bnoYx-Ylpw,1319
|
61
61
|
pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
62
|
pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3TTad9wHIPsU9s,5640
|
63
63
|
pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
|
64
64
|
pymammotion/mammotion/devices/base.py,sha256=o9JgZ9WZGxqFjvuLR7eF0crQ03JOiHumP0sRSr1dRxY,10030
|
65
|
-
pymammotion/mammotion/devices/mammotion.py,sha256=
|
66
|
-
pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=
|
67
|
-
pymammotion/mammotion/devices/mammotion_cloud.py,sha256=
|
65
|
+
pymammotion/mammotion/devices/mammotion.py,sha256=r3G13Wi1szQ1rq6J-Rwl_cddZDyp5DqkZ9BbjF5Kxpg,12538
|
66
|
+
pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=HUOKnjYUWTGjksyQDCPKF_u3dWo2ddgrWCBXnJ2VkwA,18963
|
67
|
+
pymammotion/mammotion/devices/mammotion_cloud.py,sha256=a9fB0ZCYElRxrjnwCM81RXCbxo5kJKhGa-BGck9U3-A,12949
|
68
68
|
pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
|
69
69
|
pymammotion/mqtt/mammotion_future.py,sha256=_OWqKOlUGl2yT1xOsXFQYpGd-1zQ63OxqXgy7KRQgYc,710
|
70
70
|
pymammotion/mqtt/mammotion_mqtt.py,sha256=LaySave_hf0gU3crUTLqzpdQtxIwK8vu5DM8F8fbU2Y,8748
|
@@ -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
|