Skip to content

Commit 72f3960

Browse files
authored
1 parent 2d82cac commit 72f3960

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/ZgatewayRF.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ void RFtoMQTT() {
118118
void MQTTtoRF(char* topicOri, char* datacallback) {
119119
# ifdef ZradioCC1101 // set Receive off and Transmitt on
120120
ELECHOUSE_cc1101.SetTx(receiveMhz);
121+
# endif
121122
mySwitch.disableReceive();
122123
mySwitch.enableTransmit(RF_EMITTER_GPIO);
123-
# endif
124124
SIGNAL_SIZE_UL_ULL data = STRTO_UL_ULL(datacallback, NULL, 10); // we will not be able to pass values > 4294967295 on Arduino boards
125125

126126
// RF DATA ANALYSIS
@@ -194,10 +194,10 @@ void MQTTtoRF(char* topicOri, JsonObject& RFdata) { // json object decoding
194194
if (validFrequency((int)trMhz)) {
195195
ELECHOUSE_cc1101.SetTx(trMhz);
196196
Log.notice(F("Transmit mhz: %F" CR), trMhz);
197-
mySwitch.disableReceive();
198-
mySwitch.enableTransmit(RF_EMITTER_GPIO);
199197
}
200198
# endif
199+
mySwitch.disableReceive();
200+
mySwitch.enableTransmit(RF_EMITTER_GPIO);
201201
mySwitch.setRepeatTransmit(valueRPT);
202202
mySwitch.setProtocol(valuePRT, valuePLSL);
203203
mySwitch.send(data, valueBITS);

0 commit comments

Comments
 (0)