From 72f3960c13dc219bacb1289617e64c04feeaa9e7 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Tue, 27 Jul 2021 05:29:15 -0500 Subject: [PATCH] Enable transmit outside of CC1101 (#1039) See: https://community.openmqttgateway.com/t/esp32-esp8266-fail-to-send-rf-signal/1618/11 --- main/ZgatewayRF.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/ZgatewayRF.ino b/main/ZgatewayRF.ino index 4018507..cee4159 100644 --- a/main/ZgatewayRF.ino +++ b/main/ZgatewayRF.ino @@ -118,9 +118,9 @@ void RFtoMQTT() { void MQTTtoRF(char* topicOri, char* datacallback) { # ifdef ZradioCC1101 // set Receive off and Transmitt on ELECHOUSE_cc1101.SetTx(receiveMhz); +# endif mySwitch.disableReceive(); mySwitch.enableTransmit(RF_EMITTER_GPIO); -# endif SIGNAL_SIZE_UL_ULL data = STRTO_UL_ULL(datacallback, NULL, 10); // we will not be able to pass values > 4294967295 on Arduino boards // RF DATA ANALYSIS @@ -194,10 +194,10 @@ void MQTTtoRF(char* topicOri, JsonObject& RFdata) { // json object decoding if (validFrequency((int)trMhz)) { ELECHOUSE_cc1101.SetTx(trMhz); Log.notice(F("Transmit mhz: %F" CR), trMhz); - mySwitch.disableReceive(); - mySwitch.enableTransmit(RF_EMITTER_GPIO); } # endif + mySwitch.disableReceive(); + mySwitch.enableTransmit(RF_EMITTER_GPIO); mySwitch.setRepeatTransmit(valueRPT); mySwitch.setProtocol(valuePRT, valuePLSL); mySwitch.send(data, valueBITS);