mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
Fix bug in remote_base
conditional (#6281)
Co-authored-by: Jonathan Swoboda <jonathan.swoboda>
This commit is contained in:
parent
dccad040f9
commit
b3aa950c60
@ -16,7 +16,7 @@ RemoteRMTChannel::RemoteRMTChannel(uint8_t mem_block_num) : mem_block_num_(mem_b
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RemoteRMTChannel::config_rmt(rmt_config_t &rmt) {
|
void RemoteRMTChannel::config_rmt(rmt_config_t &rmt) {
|
||||||
if (rmt_channel_t(int(this->channel_) + this->mem_block_num_) >= RMT_CHANNEL_MAX) {
|
if (rmt_channel_t(int(this->channel_) + this->mem_block_num_) > RMT_CHANNEL_MAX) {
|
||||||
this->mem_block_num_ = int(RMT_CHANNEL_MAX) - int(this->channel_);
|
this->mem_block_num_ = int(RMT_CHANNEL_MAX) - int(this->channel_);
|
||||||
ESP_LOGW(TAG, "Not enough RMT memory blocks available, reduced to %i blocks.", this->mem_block_num_);
|
ESP_LOGW(TAG, "Not enough RMT memory blocks available, reduced to %i blocks.", this->mem_block_num_);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user