mirror of https://github.com/arendst/Tasmota.git
Remove BAZMOD tags
This commit is contained in:
parent
7d19e9b0e2
commit
c62c6a821a
|
@ -146,10 +146,7 @@ const unsigned int RCSwitch::nSeparationLimit = 2600; // 4300 default
|
||||||
// should be set to the minimum value of pulselength * the sync signal
|
// should be set to the minimum value of pulselength * the sync signal
|
||||||
unsigned int RCSwitch::timings[RCSWITCH_MAX_CHANGES];
|
unsigned int RCSwitch::timings[RCSWITCH_MAX_CHANGES];
|
||||||
unsigned int RCSwitch::buftimings[4];
|
unsigned int RCSwitch::buftimings[4];
|
||||||
#ifdef BAZMODS
|
|
||||||
uint64_t_t RCSwitch::enabled_protocol_mask;
|
uint64_t_t RCSwitch::enabled_protocol_mask;
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RCSwitch::RCSwitch() {
|
RCSwitch::RCSwitch() {
|
||||||
|
@ -160,16 +157,12 @@ RCSwitch::RCSwitch() {
|
||||||
this->nReceiverInterrupt = -1;
|
this->nReceiverInterrupt = -1;
|
||||||
this->setReceiveTolerance(60);
|
this->setReceiveTolerance(60);
|
||||||
RCSwitch::nReceivedValue = 0;
|
RCSwitch::nReceivedValue = 0;
|
||||||
#ifdef BAZMODS
|
|
||||||
RCSwitch::enabled_protocol_mask.value = (1ULL << numProto)-1 ;//pow(2,numProto)-1;
|
RCSwitch::enabled_protocol_mask.value = (1ULL << numProto)-1 ;//pow(2,numProto)-1;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef BAZMODS
|
|
||||||
uint8_t RCSwitch::getNumProtos(){
|
uint8_t RCSwitch::getNumProtos(){
|
||||||
return numProto;
|
return numProto;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/**
|
/**
|
||||||
* Sets the protocol to send.
|
* Sets the protocol to send.
|
||||||
*/
|
*/
|
||||||
|
@ -845,21 +838,15 @@ void RECEIVE_ATTR RCSwitch::handleInterrupt() {
|
||||||
repeatCount++;
|
repeatCount++;
|
||||||
// при приеме второго повторного начинаем анализ принятого первым
|
// при приеме второго повторного начинаем анализ принятого первым
|
||||||
if (repeatCount == 1) {
|
if (repeatCount == 1) {
|
||||||
#ifdef BAZMODS
|
|
||||||
unsigned long long thismask = 1;
|
unsigned long long thismask = 1;
|
||||||
#endif
|
|
||||||
for(unsigned int i = 1; i <= numProto; i++) {
|
for(unsigned int i = 1; i <= numProto; i++) {
|
||||||
#ifdef BAZMODS
|
|
||||||
if(enabled_protocol_mask.value & thismask){
|
if(enabled_protocol_mask.value & thismask){
|
||||||
#endif
|
|
||||||
if (receiveProtocol(i, changeCount)) {
|
if (receiveProtocol(i, changeCount)) {
|
||||||
// receive succeeded for protocol i
|
// receive succeeded for protocol i
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef BAZMODS
|
|
||||||
}
|
}
|
||||||
thismask <<= 1;
|
thismask <<= 1;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// очищаем количество повторных пакетов
|
// очищаем количество повторных пакетов
|
||||||
repeatCount = 0;
|
repeatCount = 0;
|
||||||
|
|
|
@ -104,10 +104,8 @@ class RCSwitch {
|
||||||
unsigned int getReceivedDelay();
|
unsigned int getReceivedDelay();
|
||||||
unsigned int getReceivedProtocol();
|
unsigned int getReceivedProtocol();
|
||||||
unsigned int* getReceivedRawdata();
|
unsigned int* getReceivedRawdata();
|
||||||
#ifdef BAZMODS
|
|
||||||
uint8_t getNumProtos();
|
uint8_t getNumProtos();
|
||||||
static uint64_t_t enabled_protocol_mask; //perhaps need function to change because used in interrupt
|
static uint64_t_t enabled_protocol_mask; //perhaps need function to change because used in interrupt
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void enableTransmit(int nTransmitterPin);
|
void enableTransmit(int nTransmitterPin);
|
||||||
|
|
|
@ -18,10 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const char kTasmotaCommands[] PROGMEM = "|" // No prefix
|
const char kTasmotaCommands[] PROGMEM = "|" // No prefix
|
||||||
#ifdef BAZMODS
|
|
||||||
#ifdef USE_RC_SWITCH
|
#ifdef USE_RC_SWITCH
|
||||||
D_CMND_RFRXPROTOCOL "|"
|
D_CMND_RFRXPROTOCOL "|"
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
D_CMND_BACKLOG "|" D_CMND_DELAY "|" D_CMND_POWER "|" D_CMND_STATUS "|" D_CMND_STATE "|" D_CMND_SLEEP "|" D_CMND_UPGRADE "|" D_CMND_UPLOAD "|" D_CMND_OTAURL "|"
|
D_CMND_BACKLOG "|" D_CMND_DELAY "|" D_CMND_POWER "|" D_CMND_STATUS "|" D_CMND_STATE "|" D_CMND_SLEEP "|" D_CMND_UPGRADE "|" D_CMND_UPLOAD "|" D_CMND_OTAURL "|"
|
||||||
D_CMND_SERIALLOG "|" D_CMND_RESTART "|" D_CMND_POWERONSTATE "|" D_CMND_PULSETIME "|" D_CMND_BLINKTIME "|" D_CMND_BLINKCOUNT "|" D_CMND_SAVEDATA "|"
|
D_CMND_SERIALLOG "|" D_CMND_RESTART "|" D_CMND_POWERONSTATE "|" D_CMND_PULSETIME "|" D_CMND_BLINKTIME "|" D_CMND_BLINKCOUNT "|" D_CMND_SAVEDATA "|"
|
||||||
|
@ -49,10 +47,8 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix
|
||||||
#endif // ESP32
|
#endif // ESP32
|
||||||
;
|
;
|
||||||
void (* const TasmotaCommand[])(void) PROGMEM = {
|
void (* const TasmotaCommand[])(void) PROGMEM = {
|
||||||
#ifdef BAZMODS
|
|
||||||
#ifdef USE_RC_SWITCH
|
#ifdef USE_RC_SWITCH
|
||||||
&CmndRfRxProtocol,
|
&CmndRfRxProtocol,
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
&CmndBacklog, &CmndDelay, &CmndPower, &CmndStatus, &CmndState, &CmndSleep, &CmndUpgrade, &CmndUpgrade, &CmndOtaUrl,
|
&CmndBacklog, &CmndDelay, &CmndPower, &CmndStatus, &CmndState, &CmndSleep, &CmndUpgrade, &CmndUpgrade, &CmndOtaUrl,
|
||||||
&CmndSeriallog, &CmndRestart, &CmndPowerOnState, &CmndPulsetime, &CmndBlinktime, &CmndBlinkcount, &CmndSavedata,
|
&CmndSeriallog, &CmndRestart, &CmndPowerOnState, &CmndPulsetime, &CmndBlinktime, &CmndBlinkcount, &CmndSavedata,
|
||||||
|
|
|
@ -90,10 +90,8 @@ void RfInit(void)
|
||||||
if (PinUsed(GPIO_RFRECV)) {
|
if (PinUsed(GPIO_RFRECV)) {
|
||||||
pinMode( Pin(GPIO_RFRECV), INPUT);
|
pinMode( Pin(GPIO_RFRECV), INPUT);
|
||||||
mySwitch.enableReceive(Pin(GPIO_RFRECV));
|
mySwitch.enableReceive(Pin(GPIO_RFRECV));
|
||||||
#ifdef BAZMODS
|
|
||||||
mySwitch.enabled_protocol_mask.longs.high32 = Settings.ex_adc_param1;
|
mySwitch.enabled_protocol_mask.longs.high32 = Settings.ex_adc_param1;
|
||||||
mySwitch.enabled_protocol_mask.longs.low32 = Settings.ex_adc_param2;
|
mySwitch.enabled_protocol_mask.longs.low32 = Settings.ex_adc_param2;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +99,6 @@ void RfInit(void)
|
||||||
* Commands
|
* Commands
|
||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
#ifdef BAZMODS
|
|
||||||
void CmndRfRxProtocol(void){
|
void CmndRfRxProtocol(void){
|
||||||
uint64_t thisbit;
|
uint64_t thisbit;
|
||||||
// AddLog_P(LOG_LEVEL_INFO, PSTR("RFR: index:%d usridx:%d data_len:%d data:%s"),XdrvMailbox.index, XdrvMailbox.usridx, XdrvMailbox.data_len,XdrvMailbox.data);
|
// AddLog_P(LOG_LEVEL_INFO, PSTR("RFR: index:%d usridx:%d data_len:%d data:%s"),XdrvMailbox.index, XdrvMailbox.usridx, XdrvMailbox.data_len,XdrvMailbox.data);
|
||||||
|
@ -149,7 +146,7 @@ void CmndRfRxProtocol(void){
|
||||||
ResponseJsonEnd();
|
ResponseJsonEnd();
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
void CmndRfSend(void)
|
void CmndRfSend(void)
|
||||||
{
|
{
|
||||||
bool error = false;
|
bool error = false;
|
||||||
|
|
Loading…
Reference in New Issue