Skip to content

Commit

Permalink
Enable transmit outside of CC1101 (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile authored Jul 27, 2021
1 parent 2d82cac commit 72f3960
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main/ZgatewayRF.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 72f3960

Please sign in to comment.