mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Fix sending packets to uponor_smatrix devices (#6392)
This commit is contained in:
parent
f3f7bdc4e1
commit
1e5dc15972
1 changed files with 3 additions and 1 deletions
|
@ -173,7 +173,9 @@ bool UponorSmatrixComponent::send(uint16_t device_address, const UponorSmatrixDa
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Assemble packet for send queue. All fields are big-endian except for the little-endian checksum.
|
// Assemble packet for send queue. All fields are big-endian except for the little-endian checksum.
|
||||||
std::vector<uint8_t> packet(6 + 3 * data_len);
|
std::vector<uint8_t> packet;
|
||||||
|
packet.reserve(6 + 3 * data_len);
|
||||||
|
|
||||||
packet.push_back(this->address_ >> 8);
|
packet.push_back(this->address_ >> 8);
|
||||||
packet.push_back(this->address_ >> 0);
|
packet.push_back(this->address_ >> 0);
|
||||||
packet.push_back(device_address >> 8);
|
packet.push_back(device_address >> 8);
|
||||||
|
|
Loading…
Reference in a new issue