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:
1 parent
401be5f10c
commit
c6b2aae965
12 files changed
+553
-206
No files matched your search
+3
-3
@@ -150,7 +150,7 @@ void XtoRF2(const char* topicOri, const char* datacallback) {
|
||||
int txPower = RF_CC1101_TXPOWER;
|
||||
ELECHOUSE_cc1101.setPA((int)txPower);
|
||||
THEENGS_LOG_NOTICE(F("[RF] CC1101 TX Power: %d" CR), txPower);
|
||||
float txFrequency = RFConfig.frequency;
|
||||
float txFrequency = iRFConfig.getFrequency();
|
||||
ELECHOUSE_cc1101.SetTx(txFrequency);
|
||||
THEENGS_LOG_NOTICE(F("[RF] Transmit frequency: %F" CR), txFrequency);
|
||||
# endif
|
||||
@@ -252,7 +252,7 @@ void XtoRF2(const char* topicOri, const char* datacallback) {
|
||||
}
|
||||
}
|
||||
# ifdef ZradioCC1101
|
||||
ELECHOUSE_cc1101.SetRx(RFConfig.frequency); // set Receive on
|
||||
ELECHOUSE_cc1101.SetRx(iRFConfig.getFrequency()); // set Receive on
|
||||
# endif
|
||||
enableActiveReceiver();
|
||||
}
|
||||
@@ -273,7 +273,7 @@ void XtoRF2(const char* topicOri, JsonObject& RF2data) { // json object decoding
|
||||
int txPower = RF2data["txpower"] | RF_CC1101_TXPOWER;
|
||||
ELECHOUSE_cc1101.setPA((int)txPower);
|
||||
THEENGS_LOG_NOTICE(F("[RF] CC1101 TX Power: %d" CR), txPower);
|
||||
float txFrequency = RF2data["frequency"] | RFConfig.frequency;
|
||||
float txFrequency = RF2data["frequency"] | iRFConfig.getFrequency();
|
||||
ELECHOUSE_cc1101.SetTx(txFrequency);
|
||||
THEENGS_LOG_NOTICE(F("[RF] Transmit frequency: %F" CR), txFrequency);
|
||||
# endif
|
||||
|
||||
Reference in new issue
Block a user