From da61090dc53cf200e2a13bb66e1485045f0a5c92 Mon Sep 17 00:00:00 2001 From: Vladislav Osmanov <7123463+osmanovv@users.noreply.github.com> Date: Sun, 12 Sep 2021 13:58:56 +0300 Subject: [PATCH] fix: need to check `USE_SX1262` and `USE_SX1268` as they are using the same pinouts --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 47fbc84eb..e494f9f20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -519,7 +519,7 @@ void setup() } #endif -#if defined(SX126X_CS) +#if defined(USE_SX1262) if (!rIf) { rIf = new SX1262Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI); if (!rIf->init()) { @@ -532,9 +532,9 @@ void setup() } #endif -#if defined(SX1268_CS) +#if defined(USE_SX1268) if (!rIf) { - rIf = new SX1268Interface(SX1268_CS, SX1268_DIO1, SX1268_RESET, SX1268_BUSY, SPI); + rIf = new SX1268Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI); if (!rIf->init()) { DEBUG_MSG("Warning: Failed to find SX1268 radio\n"); delete rIf;