mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Support full (>460 char) dumps of Pronto IR commands (#6040)
Co-authored-by: Rob Paskowitz <rob@paskowitz.ca>
This commit is contained in:
parent
6061699eff
commit
e3d146ee44
1 changed files with 11 additions and 10 deletions
|
@ -227,16 +227,17 @@ optional<ProntoData> ProntoProtocol::decode(RemoteReceiveData src) {
|
|||
}
|
||||
|
||||
void ProntoProtocol::dump(const ProntoData &data) {
|
||||
std::string first, rest;
|
||||
if (data.data.size() < 230) {
|
||||
first = data.data;
|
||||
std::string rest;
|
||||
|
||||
rest = data.data;
|
||||
ESP_LOGI(TAG, "Received Pronto: data=");
|
||||
while (true) {
|
||||
ESP_LOGI(TAG, "%s", rest.substr(0, 230).c_str());
|
||||
if (rest.size() > 230) {
|
||||
rest = rest.substr(230);
|
||||
} else {
|
||||
first = data.data.substr(0, 229);
|
||||
rest = data.data.substr(230);
|
||||
break;
|
||||
}
|
||||
ESP_LOGI(TAG, "Received Pronto: data=%s", first.c_str());
|
||||
if (!rest.empty()) {
|
||||
ESP_LOGI(TAG, "%s", rest.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue