Merge upstream/main (20 commits) [upstream-sync]

This commit is contained in:
upstream-sync-bot committed 2026-10-15 11:56:47 +00:00
commit 04a6bb3318
30 files changed
+326 -24

No files matched your search

+29
View File
@@ -9,6 +9,8 @@ class CustomLR1121 : public LR1121 {
uint32_t _activityAt = 0;
bool _headerSeen = false;
bool _rx_boosted = false;
int8_t _txPower = 0;
bool _txPowerSet = false;
public:
CustomLR1121(Module *mod) : LR1121(mod) { }
@@ -36,6 +38,33 @@ class CustomLR1121 : public LR1121 {
return len;
}
using LR1121::setOutputPower;
using LR1121::setFrequency;
int16_t setOutputPower(int8_t power) override {
#ifdef LR1121_FORCE_HP_PA
const bool force_hp = true; // boards with only RFO_HP_LF wired: never select the LP PA
#else
const bool force_hp = false;
#endif
// clip to the active PA's range (HF PA tops out at 13 dBm) rather than fail and keep the other band's PA
int8_t clipped = power;
checkOutputPower(power, &clipped, force_hp);
int16_t state = LR1121::setOutputPower(clipped, force_hp);
if (state == RADIOLIB_ERR_NONE) {
_txPower = power;
_txPowerSet = true;
}
return state;
}
int16_t setFrequency(float freq) override {
int16_t state = LR1121::setFrequency(freq);
// PA selection depends on the band, and set radio / tempradio don't call setTxPower
if (state == RADIOLIB_ERR_NONE && _txPowerSet) state = setOutputPower(_txPower);
return state;
}
float getFreqMHz() const { return freqMHz; }
int16_t setRxBoostedGainMode(bool en) {