实现 LoRaMeshUartPassthroughTransport 构造函数

This commit is contained in:
2025-10-10 00:01:21 +08:00
parent 38a01f4a6e
commit 8a5f6dc34e
4 changed files with 37 additions and 84 deletions

View File

@@ -115,9 +115,12 @@ func NewApplication(configPath string) (*Application, error) {
} else {
logger.Info("当前运行模式: lora_mesh。初始化 LoRa Mesh 传输层和占位符监听器。")
listenHandler = webhook.NewPlaceholderListener(logger)
tp := lora.NewLoRaMeshUartPassthroughTransport(cfg.LoraMesh, logger)
tp, err := lora.NewLoRaMeshUartPassthroughTransport(cfg.LoraMesh, logger)
loraListener = tp
comm = tp
if err != nil {
return nil, fmt.Errorf("无法初始化 LoRa Mesh 模块: %w", err)
}
}
// 初始化计划触发器管理器