Add comment

This commit is contained in:
Jonathan Swoboda 2024-11-15 21:00:02 -05:00
parent cf0356958c
commit 3233ce1181

View file

@ -159,6 +159,7 @@ void RemoteReceiverComponent::decode_rmt_(rmt_symbol_word_t *item, size_t item_c
this->temp_.reserve(item_count * 2); // each RMT item has 2 pulses this->temp_.reserve(item_count * 2); // each RMT item has 2 pulses
for (size_t i = 0; i < item_count; i++) { for (size_t i = 0; i < item_count; i++) {
if (item[i].duration0 == 0u) { if (item[i].duration0 == 0u) {
// EOF, sometimes garbage follows, break early
break; break;
} else if ((bool(item[i].level0) == prev_level) || (item[i].duration0 < filter_ticks)) { } else if ((bool(item[i].level0) == prev_level) || (item[i].duration0 < filter_ticks)) {
prev_length += item[i].duration0; prev_length += item[i].duration0;
@ -175,6 +176,7 @@ void RemoteReceiverComponent::decode_rmt_(rmt_symbol_word_t *item, size_t item_c
} }
if (item[i].duration1 == 0u) { if (item[i].duration1 == 0u) {
// EOF, sometimes garbage follows, break early
break; break;
} else if ((bool(item[i].level1) == prev_level) || (item[i].duration1 < filter_ticks)) { } else if ((bool(item[i].level1) == prev_level) || (item[i].duration1 < filter_ticks)) {
prev_length += item[i].duration1; prev_length += item[i].duration1;