mirror of
https://github.com/esphome/esphome.git
synced 2024-12-18 15:57:58 +01:00
add log messages for bad pronto codes (#3738)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
parent
3d0a85ee78
commit
5dec9d88f6
@ -106,6 +106,7 @@ void ProntoProtocol::send_pronto_(RemoteTransmitData *dst, const std::vector<uin
|
|||||||
ESP_LOGD(TAG, "Send Pronto: intros=%d", intros);
|
ESP_LOGD(TAG, "Send Pronto: intros=%d", intros);
|
||||||
ESP_LOGD(TAG, "Send Pronto: repeats=%d", repeats);
|
ESP_LOGD(TAG, "Send Pronto: repeats=%d", repeats);
|
||||||
if (NUMBERS_IN_PREAMBLE + intros + repeats != data.size()) { // inconsistent sizes
|
if (NUMBERS_IN_PREAMBLE + intros + repeats != data.size()) { // inconsistent sizes
|
||||||
|
ESP_LOGE(TAG, "Inconsistent data, not sending");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,6 +113,10 @@ void RemoteTransmitterComponent::send_internal(uint32_t send_times, uint32_t sen
|
|||||||
this->rmt_temp_.push_back(rmt_item);
|
this->rmt_temp_.push_back(rmt_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((this->rmt_temp_.data() == nullptr) || this->rmt_temp_.empty()) {
|
||||||
|
ESP_LOGE(TAG, "Empty data");
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (uint32_t i = 0; i < send_times; i++) {
|
for (uint32_t i = 0; i < send_times; i++) {
|
||||||
esp_err_t error = rmt_write_items(this->channel_, this->rmt_temp_.data(), this->rmt_temp_.size(), true);
|
esp_err_t error = rmt_write_items(this->channel_, this->rmt_temp_.data(), this->rmt_temp_.size(), true);
|
||||||
if (error != ESP_OK) {
|
if (error != ESP_OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user