lorawan.cpp: support added for switching SF worldwide

This commit is contained in:
Klaus K Wilting 2018-10-22 19:38:26 +02:00
parent 2be4721c68
commit 0cea410e37

View File

@ -306,22 +306,22 @@ void switch_lora(uint8_t sf, uint8_t tx) {
cfg.lorasf = sf; cfg.lorasf = sf;
break; break;
case 11: case 11:
#if defined(CFG_eu868) #if defined(CFG_us915)
LMIC_setDrTxpow(DR_SF11, tx); LMIC_setDrTxpow(DR_SF11CR, tx);
cfg.lorasf = sf; cfg.lorasf = sf;
break; break;
#elif defined(CFG_us915) #else
LMIC_setDrTxpow(DR_SF11CR, tx); LMIC_setDrTxpow(DR_SF11, tx);
cfg.lorasf = sf; cfg.lorasf = sf;
break; break;
#endif #endif
case 12: case 12:
#if defined(CFG_eu868) #if defined(CFG_us915)
LMIC_setDrTxpow(DR_SF12, tx); LMIC_setDrTxpow(DR_SF12CR, tx);
cfg.lorasf = sf; cfg.lorasf = sf;
break; break;
#elif defined(CFG_us915) #else
LMIC_setDrTxpow(DR_SF12CR, tx); LMIC_setDrTxpow(DR_SF12, tx);
cfg.lorasf = sf; cfg.lorasf = sf;
break; break;
#endif #endif