remove batch

This commit is contained in:
J. Nick Koston
2025-06-05 23:59:22 +01:00
parent 7cc2d059bc
commit e4df8a70ef
2 changed files with 2 additions and 8 deletions

View File

@@ -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

View File

@@ -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;