Increased preamble to 32 for <sf9 and left at 16 for sf9 and above

This commit is contained in:
overkillfpv
2026-03-05 21:39:14 +11:00
parent 5684b4f1b8
commit 534a0c97a7
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ public:
void onSendFinished() override {
RadioLibWrapper::onSendFinished();
_radio->setPreambleLength(16); // overcomes weird issues with small and big pkts
_radio->setPreambleLength(LORA_SF <= 8 ? 32 : 16); // overcomes weird issues with small and big pkts
}
float getLastRSSI() const override { return ((CustomLR1110 *)_radio)->getRSSI(); }
@@ -26,6 +26,7 @@ void setFlag(void) {
void RadioLibWrapper::begin() {
_radio->setPacketReceivedAction(setFlag); // this is also SentComplete interrupt
_radio->setPreambleLength(LORA_SF <= 8 ? 32 : 16); // longer preamble for lower SF improves reliability
state = STATE_IDLE;
if (_board->getStartupReason() == BD_STARTUP_RX_PACKET) { // received a LoRa packet (while in deep sleep)