remove broken code

This commit is contained in:
J. Nick Koston
2025-06-06 07:24:09 +01:00
parent 1785fa181c
commit fb1bc3d627

View File

@@ -261,7 +261,7 @@ APIConnection::EncodedMessage APIConnection::encode_message_to_buffer(ProtoMessa
// Calculate overhead for this message
uint16_t overhead = conn->helper_->calculate_packet_overhead(message_type, static_cast<uint16_t>(size));
uint32_t total_size = size + overhead;
uint16_t total_size = static_cast<uint16_t>(size) + overhead;
// Check if it fits
if (total_size > remaining_size) {
@@ -274,7 +274,7 @@ APIConnection::EncodedMessage APIConnection::encode_message_to_buffer(ProtoMessa
// Encode directly into buffer
msg.encode(buffer);
return {static_cast<uint16_t>(size), static_cast<uint16_t>(total_size)};
return {static_cast<uint16_t>(size), total_size};
}
#ifdef USE_BINARY_SENSOR