1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-19 11:42:20 +01:00

[api] Optimize protobuf memory usage with fixed-size arrays for Bluetooth UUIDs (#9782)

This commit is contained in:
J. Nick Koston
2025-07-21 23:50:49 -10:00
committed by GitHub
parent 0f0038df24
commit ac08fb314f
5 changed files with 165 additions and 51 deletions

View File

@@ -1463,19 +1463,19 @@ message BluetoothGATTGetServicesRequest {
}
message BluetoothGATTDescriptor {
repeated uint64 uuid = 1;
repeated uint64 uuid = 1 [(fixed_array_size) = 2];
uint32 handle = 2;
}
message BluetoothGATTCharacteristic {
repeated uint64 uuid = 1;
repeated uint64 uuid = 1 [(fixed_array_size) = 2];
uint32 handle = 2;
uint32 properties = 3;
repeated BluetoothGATTDescriptor descriptors = 4;
}
message BluetoothGATTService {
repeated uint64 uuid = 1;
repeated uint64 uuid = 1 [(fixed_array_size) = 2];
uint32 handle = 2;
repeated BluetoothGATTCharacteristic characteristics = 3;
}
@@ -1486,7 +1486,7 @@ message BluetoothGATTGetServicesResponse {
option (ifdef) = "USE_BLUETOOTH_PROXY";
uint64 address = 1;
repeated BluetoothGATTService services = 2;
repeated BluetoothGATTService services = 2 [(fixed_array_size) = 1];
}
message BluetoothGATTGetServicesDoneResponse {