From 2472d0947ff4d8dd6c1e114cb73aed7f2531b490 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Mon, 20 Feb 2023 21:11:54 +0100 Subject: [PATCH] RadioLib's startChannel returns LORA_DETECTED for SX126x and SX128x (#2293) --- src/mesh/SX126xInterface.cpp | 2 +- src/mesh/SX128xInterface.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesh/SX126xInterface.cpp b/src/mesh/SX126xInterface.cpp index 8cd735da5..1036042eb 100644 --- a/src/mesh/SX126xInterface.cpp +++ b/src/mesh/SX126xInterface.cpp @@ -232,7 +232,7 @@ template bool SX126xInterface::isChannelActive() setStandby(); result = lora.scanChannel(); - if (result == RADIOLIB_PREAMBLE_DETECTED) + if (result == RADIOLIB_LORA_DETECTED) return true; assert(result != RADIOLIB_ERR_WRONG_MODEM); diff --git a/src/mesh/SX128xInterface.cpp b/src/mesh/SX128xInterface.cpp index c984d9f05..19001a0de 100644 --- a/src/mesh/SX128xInterface.cpp +++ b/src/mesh/SX128xInterface.cpp @@ -222,7 +222,7 @@ template bool SX128xInterface::isChannelActive() setStandby(); result = lora.scanChannel(); - if (result == RADIOLIB_PREAMBLE_DETECTED) + if (result == RADIOLIB_LORA_DETECTED) return true; assert(result != RADIOLIB_ERR_WRONG_MODEM);