From 7213cb81665655683b785976ca7db4d626f4852f Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Sun, 18 Oct 2026 18:26:03 +0700 Subject: [PATCH] RXPS in CommonRadioPrefs --- src/helpers/CommonRadioPrefs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/helpers/CommonRadioPrefs.h b/src/helpers/CommonRadioPrefs.h index 0e83ca9df..3be046528 100644 --- a/src/helpers/CommonRadioPrefs.h +++ b/src/helpers/CommonRadioPrefs.h @@ -1,9 +1,14 @@ #pragma once #include "ConfigSerializer.h" #include "KeyValueStore.h" +#include "radiolib/RXPowerSaving.h" class CommonRadioPrefs : public ConfigSerializer, public KeyValueStore { bool _is_dirty = false; + + // PowerSaving variant + uint8_t _active_sf = 0; + float _active_bw = 0; protected: CommonRadioPrefs() { } public: @@ -62,6 +67,11 @@ public: virtual uint8_t getFEMTxGain() const = 0; virtual void setFEMTxGain(uint8_t g) = 0; + // PowerSaving variant + virtual RxPowerSavingConfig* getRxPowerSavingConfig() { return nullptr; } + bool applyRxPowerSaving(uint8_t sf, float bw); + bool isRxPowerSavingCalibrationActive() const; + bool handleCommand(const char* command, uint32_t sender_timestamp, char* reply); bool setByKey(const char* key, const char* value) override; // for dynamic key/value access