sforkowany z mirror/meshtastic-firmware
Put this back in place
rodzic
f7e1f4cea6
commit
6cdf2817f4
|
@ -60,6 +60,15 @@ template <typename T> bool SX126xInterface<T>::init()
|
|||
LOG_DEBUG("Current limit set to %f\n", currentLimit);
|
||||
LOG_DEBUG("Current limit set result %d\n", res);
|
||||
|
||||
#if defined(SX126X_E22)
|
||||
// E22 Emulation explicitly requires DIO2 as RF switch, so set it to TRUE again for good measure. In case somebody defines
|
||||
// SX126X_TX for an E22 Module
|
||||
if (res == RADIOLIB_ERR_NONE) {
|
||||
LOG_DEBUG("SX126X_E22 mode enabled. Setting DIO2 as RF Switch\n");
|
||||
res = lora.setDio2AsRfSwitch(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SX126X_TXEN) && (SX126X_TXEN != RADIOLIB_NC)
|
||||
// lora.begin sets Dio2 as RF switch control, which is not true if we are manually controlling RX and TX
|
||||
if (res == RADIOLIB_ERR_NONE) {
|
||||
|
@ -67,13 +76,6 @@ template <typename T> bool SX126xInterface<T>::init()
|
|||
res = lora.setDio2AsRfSwitch(false);
|
||||
lora.setRfSwitchPins(SX126X_RXEN, SX126X_TXEN);
|
||||
}
|
||||
#elif defined(SX126X_E22)
|
||||
// E22 Emulation explicitly requires DIO2 as RF switch, so set it to TRUE again for good measure. In case somebody defines
|
||||
// SX126X_TX for an E22 Module
|
||||
if (res == RADIOLIB_ERR_NONE) {
|
||||
LOG_DEBUG("SX126X_E22 mode enabled. Setting DIO2 as RF Switch\n");
|
||||
res = lora.setDio2AsRfSwitch(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (config.lora.sx126x_rx_boosted_gain) {
|
||||
|
|
Ładowanie…
Reference in New Issue