69 ESP_LOGV(TAG,
"received %d-bit value: %llx", count, value);
71 trigger->trigger(count, value);
74 buf_append_printf(tag_buf,
sizeof(tag_buf), 0,
"%" PRIu32,
static_cast<uint32_t
>((value >> 1) & 0xffffff));
75 ESP_LOGD(TAG,
"received 26-bit tag: %s", tag_buf);
77 ESP_LOGW(TAG,
"invalid parity");
81 trigger->trigger(tag_buf);
82 }
else if (count == 34) {
84 buf_append_printf(tag_buf,
sizeof(tag_buf), 0,
"%" PRIu32,
static_cast<uint32_t
>((value >> 1) & 0xffffffff));
85 ESP_LOGD(TAG,
"received 34-bit tag: %s", tag_buf);
87 ESP_LOGW(TAG,
"invalid parity");
91 trigger->trigger(tag_buf);
92 }
else if (count == 37) {
94 buf_append_printf(tag_buf,
sizeof(tag_buf), 0,
"%" PRIu64,
static_cast<uint64_t
>((value >> 1) & 0x7ffffffff));
95 ESP_LOGD(TAG,
"received 37-bit tag: %s", tag_buf);
97 ESP_LOGW(TAG,
"invalid parity");
101 trigger->trigger(tag_buf);
102 }
else if (count == 4) {
104 trigger->trigger(value);
106 uint8_t key = KEYS[value];
109 }
else if (count == 8) {
110 if ((value ^ 0xf0) >> 4 == (value & 0xf)) {
113 trigger->trigger(value);
115 uint8_t key = KEYS[value];
120 ESP_LOGD(TAG,
"received unknown %d-bit value: %llx", count, value);