[RF] Disable the active RF receive when transmitting with RC-Switch and NewRemoteTransmitter\n (#2084)

Pilight RF transmit is behaving this way already.
This commit is contained in:
peshovec authored and GitHub committed 2024-11-07 07:55:30 -06:00
1 parent f5bca0054e
commit e2641f49e7
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -238,8 +238,8 @@ void XtoRF(const char* topicOri, JsonObject& RFdata) { // json object decoding
Log.notice(F("RF Protocol:%d" CR), valuePRT);
Log.notice(F("RF Pulse Lgth: %d" CR), valuePLSL);
Log.notice(F("Bits nb: %d" CR), valueBITS);
# ifdef ZradioCC1101
disableCurrentReceiver();
# ifdef ZradioCC1101
initCC1101();
int txPower = RFdata["txpower"] | RF_CC1101_TXPOWER;
ELECHOUSE_cc1101.setPA((int)txPower);
+4 -4
View File
@@ -133,7 +133,7 @@ void rf2Callback(unsigned int period, unsigned long address, unsigned long group
# if simpleReceiving
void XtoRF2(const char* topicOri, const char* datacallback) {
NewRemoteReceiver::disable();
disableCurrentReceiver();
pinMode(RF_EMITTER_GPIO, OUTPUT);
initCC1101();
@@ -235,8 +235,8 @@ void XtoRF2(const char* topicOri, const char* datacallback) {
}
# ifdef ZradioCC1101
ELECHOUSE_cc1101.SetRx(RFConfig.frequency); // set Receive on
NewRemoteReceiver::enable();
# endif
enableActiveReceiver();
}
# endif
@@ -266,7 +266,7 @@ void XtoRF2(const char* topicOri, JsonObject& RF2data) { // json object decoding
valueUNIT = 0;
if (valuePERIOD == 0)
valuePERIOD = 272;
NewRemoteReceiver::disable();
disableCurrentReceiver();
NewRemoteTransmitter transmitter(valueCODE, RF_EMITTER_GPIO, valuePERIOD, RF2_EMITTER_REPEAT);
Log.trace(F("Sending" CR));
if (valueGROUP) {
@@ -283,7 +283,7 @@ void XtoRF2(const char* topicOri, JsonObject& RF2data) { // json object decoding
}
}
Log.notice(F("MQTTtoRF2 OK" CR));
NewRemoteReceiver::enable();
enableActiveReceiver();
success = true;
}