Hi,
I've registered a digoo receiver and I get a lot of false readings in my area here. In the following code sample I've added a few sanity checks that seem to exclude all false positives.
uint8_t digoo::isValidPacket(uint64_t ppacket) {
uint8_t id = getId(ppacket);
uint8_t firstCheck = (ppacket >> 24) & 0x4;
uint8_t secondCheck = (ppacket >> 8) & 0x0F;
//check for valid id and control bits, see protocol specs https://github.com/aquaticus/nexus433#nexus-protocol
if (id != 0 && firstCheck == 0 && secondCheck == 15) {
return OK;
}
return INVALID_SYNC;
}
But I am by no means a C++ programmer, so please improve the code ;)
Hi, I've registered a digoo receiver and I get a lot of false readings in my area here. In the following code sample I've added a few sanity checks that seem to exclude all false positives.
But I am by no means a C++ programmer, so please improve the code ;)
Tested with a DG-R8H and DG-TH8805 transmitter.
Greetings Alex