Refactor RF Configuration Management (#2245)

- Introduced RFConfiguration class to encapsulate RF settings and operations.
- Replaced direct usage of RFConfig structure with iRFConfig instance across multiple files.
- Updated frequency handling in actuatorSomfy, gatewayPilight, gatewayRF, and gatewayRF2 to use iRFConfig.
- Modified webUI to interact with iRFConfig for RF settings management.
- Removed deprecated RFConfig structure and related functions.
- Enhanced JSON handling for RF configuration loading and saving.
- Improved logging for RF configuration operations.
This commit is contained in:
Alessandro Staniscia authored and GitHub committed 2025-12-07 09:56:15 -06:00
1 parent 401be5f10c
commit c6b2aae965
12 files changed
+553 -206

No files matched your search

+2 -2
View File
@@ -218,7 +218,7 @@ void XtoPilight(const char* topicOri, JsonObject& Pilightdata) {
const char* protocol = Pilightdata["protocol"];
THEENGS_LOG_NOTICE(F("MQTTtoPilight protocol: %s" CR), protocol);
const char* raw = Pilightdata["raw"];
float txFrequency = Pilightdata["frequency"] | RFConfig.frequency;
float txFrequency = Pilightdata["frequency"] | iRFConfig.getFrequency();
bool success = false;
disableCurrentReceiver();
initCC1101();
@@ -307,7 +307,7 @@ extern void disablePilightReceive() {
};
extern void enablePilightReceive() {
THEENGS_LOG_NOTICE(F("Switching to Pilight Receiver: %F" CR), RFConfig.frequency);
THEENGS_LOG_NOTICE(F("Switching to Pilight Receiver: %F" CR), iRFConfig.getFrequency());
THEENGS_LOG_NOTICE(F("RF_EMITTER_GPIO: %d " CR), RF_EMITTER_GPIO);
THEENGS_LOG_NOTICE(F("RF_RECEIVER_GPIO: %d " CR), RF_RECEIVER_GPIO);
THEENGS_LOG_TRACE(F("gatewayPilight command topic: %s%s%s" CR), mqtt_topic, gateway_name, subjectMQTTtoPilight);