From 0cea410e37c59a15c3e5c443ab616a5feb98b7a0 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Mon, 22 Oct 2018 19:38:26 +0200 Subject: [PATCH] lorawan.cpp: support added for switching SF worldwide --- src/lorawan.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lorawan.cpp b/src/lorawan.cpp index acb40438..537e95a1 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -306,22 +306,22 @@ void switch_lora(uint8_t sf, uint8_t tx) { cfg.lorasf = sf; break; case 11: -#if defined(CFG_eu868) - LMIC_setDrTxpow(DR_SF11, tx); +#if defined(CFG_us915) + LMIC_setDrTxpow(DR_SF11CR, tx); cfg.lorasf = sf; break; -#elif defined(CFG_us915) - LMIC_setDrTxpow(DR_SF11CR, tx); +#else + LMIC_setDrTxpow(DR_SF11, tx); cfg.lorasf = sf; break; #endif case 12: -#if defined(CFG_eu868) - LMIC_setDrTxpow(DR_SF12, tx); +#if defined(CFG_us915) + LMIC_setDrTxpow(DR_SF12CR, tx); cfg.lorasf = sf; break; -#elif defined(CFG_us915) - LMIC_setDrTxpow(DR_SF12CR, tx); +#else + LMIC_setDrTxpow(DR_SF12, tx); cfg.lorasf = sf; break; #endif