16 for (uint8_t i = 0; i < this->
size() - 1; i++) {
18 temp = temp ^ (uint16_t) (((uint32_t) temp << 0x11) >> 0x10) ^ (uint16_t) (((uint32_t) temp << 0x12) >> 0x10) ^
19 (uint16_t) (((uint32_t) temp << 0x13) >> 0x10) ^ (uint16_t) (((uint32_t) temp << 0x14) >> 0x10) ^
20 (uint16_t) (((uint32_t) temp << 0x15) >> 0x10) ^ (uint16_t) (((uint32_t) temp << 0x16) >> 0x10) ^
21 (uint16_t) (((uint32_t) temp << 0x17) >> 0x10);
22 checksum = (temp & 0xfe) ^ ((temp >> 8) & 1);
81 if (src.
expect_item(BIT_ZERO_MARK_US, BIT_ZERO_SPACE_US) &&
82 src.
expect_item(BIT_ZERO_MARK_US, BIT_ZERO_SPACE_US + BIT_ONE_SPACE_US) &&
83 src.
expect_item(BIT_ZERO_MARK_US, BIT_ZERO_SPACE_US + BIT_ONE_SPACE_US) &&
84 src.
expect_item(BIT_ZERO_MARK_US, BIT_ZERO_SPACE_US + BIT_ONE_SPACE_US) &&
85 src.
expect_item(BIT_ZERO_MARK_US, BIT_ZERO_SPACE_US + BIT_ONE_SPACE_US + BYTE_SPACE_US) &&
86 src.
expect_item(BIT_ZERO_MARK_US, BIT_ZERO_SPACE_US + 8 * BIT_ONE_SPACE_US + BYTE_SPACE_US)) {
87 ESP_LOGVV(TAG,
"Received Header: 0x55FF");
93 uint8_t received_bytes = 2;
94 for (; (received_bytes <
length) && !done; received_bytes++) {
97 ESP_LOGW(TAG,
"Received incomplete packet: %s", out.
to_string(received_bytes).c_str());
100 if (received_bytes == 2) {
101 length += std::min(
static_cast<uint8_t
>(data & DATA_LENGTH_MASK), MAX_DATA_LENGTH);
106 ESP_LOGVV(TAG,
"Received Byte: 0x%02X", data);
107 out[received_bytes] = data;
110 ESP_LOGI(TAG,
"Received: %s", out.
to_string().c_str());
113 ESP_LOGW(TAG,
"Received malformed packet: %s", out.
to_string(received_bytes).c_str());