Skip to content

Commit 511d403

Browse files
committed
up
1 parent 2d7f318 commit 511d403

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

client/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def init():
289289
print('done.')
290290

291291
print('init uart ...')
292-
uart1 = machine.UART(1, baudrate=CFG_UART_BAUD, tx=CFG_UART_PIN_TX, rx=CFG_UART_PIN_RX)
292+
uart1 = machine.UART(1, baudrate=CFG_UART_BAUD, tx=CFG_UART_PIN_TX, rx=CFG_UART_PIN_RX, rxbuf=1024)
293293
print('done.')
294294

295295
async def process_request(req, writer, conn_id):
@@ -443,8 +443,8 @@ async def rmt_recorder_process():
443443
except Exception as e:
444444
print('remote recorder abort:', e)
445445
finally:
446-
print('reconnect after 10sec...')
447-
await asyncio.sleep(10)
446+
print('reconnect after 5sec...')
447+
await asyncio.sleep(5)
448448

449449
async def send_to_web_terminal(tx_buffer):
450450
global event_stream_conns
@@ -478,7 +478,7 @@ async def uart_handler():
478478
last_active_time = time.time()
479479
while True:
480480
if uart1.any() == 0:
481-
await asyncio.sleep_ms(50)
481+
await asyncio.sleep_ms(10)
482482
if time.time() > last_active_time + 40:
483483
last_active_time = time.time()
484484
print('send keepalive.')

0 commit comments

Comments
 (0)