Update preamble dynamically to match runtime SF changes via CLI
This commit is contained in:
@@ -19,10 +19,11 @@ public:
|
||||
|
||||
void onSendFinished() override {
|
||||
RadioLibWrapper::onSendFinished();
|
||||
_radio->setPreambleLength(LORA_SF <= 8 ? 32 : 16); // overcomes weird issues with small and big pkts
|
||||
_radio->setPreambleLength(getSpreadingFactor() <= 8 ? 32 : 16); // overcomes weird issues with small and big pkts
|
||||
}
|
||||
|
||||
float getLastRSSI() const override { return ((CustomLR1110 *)_radio)->getRSSI(); }
|
||||
float getLastSNR() const override { return ((CustomLR1110 *)_radio)->getSNR(); }
|
||||
uint8_t getSpreadingFactor() const override { return ((CustomLR1110 *)_radio)->getSpreadingFactor(); }
|
||||
int16_t setRxBoostedGainMode(bool en) { return ((CustomLR1110 *)_radio)->setRxBoostedGainMode(en); };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user