16void GCJA5Component::loop() {
49 ESP_LOGV(TAG,
"Have 32 bytes but not good data. Skipping.");
61 ESP_LOGVV(TAG,
"Checksum packet was (0x%02X), calculated checksum was (0x%02X)", this->
rx_message_[30], crc);
67 ESP_LOGVV(TAG,
"GCJA5 Data: ");
68 for (uint8_t i = 0; i < 32; i++) {
69 ESP_LOGVV(TAG,
" %u: 0b" BYTE_TO_BINARY_PATTERN
" (0x%02X)", i + 1, BYTE_TO_BINARY(this->
rx_message_[i]),
74 ESP_LOGVV(TAG,
"Discarding bad packet - failed checks.");
77 ESP_LOGVV(TAG,
"Good packet found.");
85 " Overall Status : %i\n"
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
void status_set_warning()
virtual void dump_config()
void status_clear_warning()
uint32_t get_32_bit_uint_(uint8_t start_index) const
uint16_t get_16_bit_uint_(uint8_t start_index) const
bool calculate_checksum_()
uint32_t last_transmission_
std::vector< uint8_t > rx_message_
bool read_available(F &&on_byte)
Same as read_available_chunks(), calling on_byte(uint8_t) once per byte.
ESPHOME_LOG_TAG(TAG, "gcja5")
constexpr uint8_t xor_bytes(const uint8_t *data, size_t len, uint8_t init=0)
XOR the bytes of data with size len, starting from init.
Application App
Global storage of Application pointer - only one Application can exist.