优化日志

This commit is contained in:
2025-10-17 10:44:20 +08:00
parent fa437b30aa
commit 3b967aa449
4 changed files with 10 additions and 7 deletions

View File

@@ -206,6 +206,7 @@ func (t *LoRaMeshUartPassthroughTransport) workerLoop() {
t.runIdleState()
case stateReceiving:
t.runReceivingState()
default:
}
}
}
@@ -256,6 +257,7 @@ func (t *LoRaMeshUartPassthroughTransport) executeSend(req *sendRequest) (*trans
frame.WriteByte(currentChunk) // 当前包序号
frame.Write(chunk) // 数据块
t.logger.Infof("构建LoRa数据包: %v", frame.Bytes())
_, err := t.port.Write(frame.Bytes())
if err != nil {
return nil, fmt.Errorf("写入串口失败: %w", err)