mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-14 00:52:05 +00:00
Move sx1262 fixes upstream (#1421)
This commit is contained in:
parent
bfc2d30a46
commit
53cc090814
@ -65,7 +65,7 @@ bool SX126xInterface<T>::init()
|
|||||||
#ifdef SX126X_TXEN
|
#ifdef SX126X_TXEN
|
||||||
// lora.begin sets Dio2 as RF switch control, which is not true if we are manually controlling RX and TX
|
// lora.begin sets Dio2 as RF switch control, which is not true if we are manually controlling RX and TX
|
||||||
if (res == ERR_NONE)
|
if (res == ERR_NONE)
|
||||||
res = lora.setDio2AsRfSwitch(false);
|
res = lora.setDio2AsRfSwitch(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -194,6 +194,9 @@ void SX126xInterface<T>::configHardwareForSend()
|
|||||||
#ifdef SX126X_TXEN // we have RXEN/TXEN control - turn on TX power / off RX power
|
#ifdef SX126X_TXEN // we have RXEN/TXEN control - turn on TX power / off RX power
|
||||||
digitalWrite(SX126X_TXEN, HIGH);
|
digitalWrite(SX126X_TXEN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SX126X_RXEN
|
||||||
|
digitalWrite(SX126X_RXEN, LOW);
|
||||||
|
#endif
|
||||||
|
|
||||||
RadioLibInterface::configHardwareForSend();
|
RadioLibInterface::configHardwareForSend();
|
||||||
}
|
}
|
||||||
@ -213,6 +216,9 @@ void SX126xInterface<T>::startReceive()
|
|||||||
#ifdef SX126X_RXEN // we have RXEN/TXEN control - turn on RX power / off TX power
|
#ifdef SX126X_RXEN // we have RXEN/TXEN control - turn on RX power / off TX power
|
||||||
digitalWrite(SX126X_RXEN, HIGH);
|
digitalWrite(SX126X_RXEN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SX126X_TXEN
|
||||||
|
digitalWrite(SX126X_TXEN, LOW);
|
||||||
|
#endif
|
||||||
|
|
||||||
// int err = lora.startReceive();
|
// int err = lora.startReceive();
|
||||||
int err = lora.startReceiveDutyCycleAuto(); // We use a 32 bit preamble so this should save some power by letting radio sit in
|
int err = lora.startReceiveDutyCycleAuto(); // We use a 32 bit preamble so this should save some power by letting radio sit in
|
||||||
|
Loading…
Reference in New Issue
Block a user