diff --git a/code/espurna/rfbridge.ino b/code/espurna/rfbridge.ino index 2c281973..9af59322 100644 --- a/code/espurna/rfbridge.ino +++ b/code/espurna/rfbridge.ino @@ -112,6 +112,42 @@ void _rfbSend(byte * message, int times) { } +bool _rfbMatch(char * code, unsigned char& relayID, unsigned char& value) { + + if (strlen(code) != 18) return false; + + bool found = false; + String compareto = String(&code[12]); + compareto.toUpperCase(); + DEBUG_MSG_P(PSTR("[RFBRIDGE] Trying to match code %s\n"), compareto.c_str()); + + for (unsigned char i=0; i