This commit is contained in:
yrx
2026-08-11 13:38:27 +08:00
parent abbf30d7c0
commit 6556cfcf74
39 changed files with 678 additions and 58 deletions
+7 -6
View File
@@ -76,10 +76,11 @@ class ATClient:
"""
expect_b = expect.encode() if isinstance(expect, str) else expect
with self._cmd_lock:
# 初始化等待
self._waiting = True
self._expect = expect_b
self._resp = b""
with self._q_lock:
# 初始化等待
self._waiting = True
self._expect = expect_b
self._resp = b""
# 发送
if cmd:
@@ -300,8 +301,8 @@ class ATClient:
if len(self._rx) > 512 * 1024:
self._rx = self._rx[-256 * 1024:]
else:
if len(self._rx) > 16384:
self._rx = self._rx[-4096:]
if len(self._rx) > 32768:
self._rx = self._rx[-16384:]