[midea] Reduce heap allocations with stack-based string formatting (#13000)
This commit is contained in:
1 parent
0290ed5d23
commit
2d4cd4ce7e
3 files changed
+13
-2
No files matched your search
@@ -70,7 +70,10 @@ optional<MideaData> MideaProtocol::decode(RemoteReceiveData src) {
|
||||
return {};
|
||||
}
|
||||
|
||||
void MideaProtocol::dump(const MideaData &data) { ESP_LOGI(TAG, "Received Midea: %s", data.to_string().c_str()); }
|
||||
void MideaProtocol::dump(const MideaData &data) {
|
||||
char buf[MideaData::TO_STR_BUFFER_SIZE];
|
||||
ESP_LOGI(TAG, "Received Midea: %s", data.to_str(buf));
|
||||
}
|
||||
|
||||
} // namespace remote_base
|
||||
} // namespace esphome
|
||||
Reference in new issue
Block a user