radio: RX duty cycle (RXPS) from EasySkyMesh PowerSaving v18, opt-in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-12 14:57:16 +01:00
1 parent 507842cea2
commit b06fd957b9
14 files changed
+1386 -1

No files matched your search

+13
View File
@@ -71,6 +71,9 @@ public:
float ina_shunt_mohm = 0; // CUSTOM (TeTeHacko): INA shunt in mOhm, 0 = build default
char owner_info[120];
uint8_t rx_boosted_gain = 0; // power settings
#ifdef WITH_RX_POWERSAVING
RxPowerSavingConfig rxps; // CUSTOM (TeTeHacko): RX duty cycle, off by default
#endif
uint8_t radio_fem_rxgain = 0; // LoRa FEM RX gain setting
uint8_t radio_fem_txgain = 0; // LoRa FEM TX gain setting
uint8_t path_hash_mode = 0; // which path mode to use when sending
@@ -125,10 +128,20 @@ private:
def("agc_int", _parent->agc_reset_interval);
def("hash_mode", _parent->path_hash_mode);
def("multi_ack", _parent->multi_acks);
#ifdef WITH_RX_POWERSAVING
def("rxps_en", _parent->rxps.enabled);
def("rxps_rx_us", _parent->rxps.rx_us);
def("rxps_sleep_us", _parent->rxps.sleep_us);
def("rxps_level", _parent->rxps.level);
def("rxps_preamble", _parent->rxps.preamble);
#endif
def("rsilence", _parent->radio_silence_min);
}
public:
RadioPrefs(NodePrefs* parent) : _parent(parent) { }
#ifdef WITH_RX_POWERSAVING
RxPowerSavingConfig* getRxPowerSavingConfig() override { return &_parent->rxps; }
#endif
// CommonRadioPrefs interface
float getFreq() const override { return _parent->freq; }
void setFreq(float f) override { _parent->freq = f; markDirty(); }