Merge remote-tracking branch 'upstream/dev' into integration

This commit is contained in:
J. Nick Koston
2026-03-04 14:18:36 -10:00
4 changed files with 13 additions and 7 deletions
+2 -2
View File
@@ -110,9 +110,9 @@ uint8_t DS2484OneWireBus::read8() {
}
uint64_t DS2484OneWireBus::read64() {
uint8_t response = 0;
uint64_t response = 0;
for (uint8_t i = 0; i < 8; i++) {
response |= (this->read8() << (i * 8));
response |= (static_cast<uint64_t>(this->read8()) << (i * 8));
}
return response;
}
+3 -1
View File
@@ -41,7 +41,9 @@ void SGP30Component::setup() {
this->mark_failed();
return;
}
this->serial_number_ = encode_uint24(raw_serial_number[0], raw_serial_number[1], raw_serial_number[2]);
this->serial_number_ = (static_cast<uint64_t>(raw_serial_number[0]) << 32) |
(static_cast<uint64_t>(raw_serial_number[1]) << 16) |
static_cast<uint64_t>(raw_serial_number[2]);
ESP_LOGD(TAG, "Serial number: %" PRIu64, this->serial_number_);
// Featureset identification for future use
@@ -281,6 +281,10 @@ bool ZWaveProxy::parse_byte_(uint8_t byte) {
break;
}
case ZWAVE_PARSING_STATE_READ_BL_MENU:
if (this->buffer_index_ >= this->buffer_.size()) {
this->parsing_state_ = ZWAVE_PARSING_STATE_WAIT_START;
break;
}
this->buffer_[this->buffer_index_++] = byte;
if (!byte) {
this->parsing_state_ = ZWAVE_PARSING_STATE_WAIT_START;
+4 -4
View File
@@ -81,10 +81,10 @@ class ZWaveProxy : public uart::UARTDevice, public Component {
api::APIConnection *api_connection_{nullptr}; // Current subscribed client
uint32_t setup_time_{0}; // Time when setup() was called
// 8-bit values (grouped together to minimize padding)
uint8_t buffer_index_{0}; // Index for populating the data buffer
uint8_t end_frame_after_{0}; // Payload reception ends after this index
uint8_t last_response_{0}; // Last response type sent
// Small values (grouped by size to minimize padding)
uint16_t buffer_index_{0}; // Index for populating the data buffer
uint16_t end_frame_after_{0}; // Payload reception ends after this index
uint8_t last_response_{0}; // Last response type sent
ZWaveParsingState parsing_state_{ZWAVE_PARSING_STATE_WAIT_START};
bool in_bootloader_{false}; // True if the device is detected to be in bootloader mode
bool home_id_ready_{false}; // True when home ID has been received from Z-Wave module