mirror of
https://github.com/esphome/esphome.git
synced 2026-09-21 12:08:38 +00:00
Fix encode_bool to encode actual value when force=true
This commit is contained in:
@@ -292,7 +292,7 @@ class ProtoWriteBuffer {
|
||||
if (!value && !force)
|
||||
return;
|
||||
this->encode_field_raw(field_id, 0); // type 0: Varint - bool
|
||||
this->buffer_->push_back(0x01);
|
||||
this->buffer_->push_back(value ? 0x01 : 0x00);
|
||||
}
|
||||
void encode_fixed32(uint32_t field_id, uint32_t value, bool force = false) {
|
||||
if (value == 0 && !force)
|
||||
|
||||
Reference in New Issue
Block a user