mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 11:56:25 +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
33051906bd
commit
978a676c7c
@ -227,16 +227,17 @@ optional<ProntoData> ProntoProtocol::decode(RemoteReceiveData src) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ProntoProtocol::dump(const ProntoData &data) {
|
void ProntoProtocol::dump(const ProntoData &data) {
|
||||||
std::string first, rest;
|
std::string rest;
|
||||||
if (data.data.size() < 230) {
|
|
||||||
first = data.data;
|
rest = data.data;
|
||||||
} else {
|
ESP_LOGI(TAG, "Received Pronto: data=");
|
||||||
first = data.data.substr(0, 229);
|
while (true) {
|
||||||
rest = data.data.substr(230);
|
ESP_LOGI(TAG, "%s", rest.substr(0, 230).c_str());
|
||||||
}
|
if (rest.size() > 230) {
|
||||||
ESP_LOGI(TAG, "Received Pronto: data=%s", first.c_str());
|
rest = rest.substr(230);
|
||||||
if (!rest.empty()) {
|
} else {
|
||||||
ESP_LOGI(TAG, "%s", rest.c_str());
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user