remove batch
This commit is contained in:
@@ -1516,13 +1516,7 @@ void APIConnection::process_batch_() {
|
||||
}
|
||||
|
||||
// Encode the message directly from the stored ProtoMessage
|
||||
bool success = item.message->encode(batch_buffer);
|
||||
|
||||
if (!success) {
|
||||
ESP_LOGW(TAG, "Failed to encode message type %u", item.message->get_message_type());
|
||||
// Since we pre-calculated sizes, encoding should not fail
|
||||
// If it does, we have a serious issue
|
||||
}
|
||||
item.message->encode(batch_buffer);
|
||||
}
|
||||
|
||||
// Send all collected packets
|
||||
|
||||
@@ -330,7 +330,7 @@ class ProtoMessage {
|
||||
virtual void encode(ProtoWriteBuffer buffer) const = 0;
|
||||
void decode(const uint8_t *buffer, size_t length);
|
||||
virtual void calculate_size(uint32_t &total_size) const = 0;
|
||||
virtual uint16_t get_message_type() const = 0;
|
||||
virtual uint16_t get_message_type() const { return 0; } // Default for nested types
|
||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||
std::string dump() const;
|
||||
virtual void dump_to(std::string &out) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user