Skip to content

Commit 6ee497b

Browse files
authored
rmt_config_t config Initialization with {}
Otherwise sometimes the "NACK" error appears
1 parent c3f1a90 commit 6ee497b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/esp32DHT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ DHT::~DHT() {
4343
void DHT::setup(uint8_t pin, rmt_channel_t channel) {
4444
_pin = pin;
4545
_channel = channel;
46-
rmt_config_t config;
46+
rmt_config_t config{};
4747
config.rmt_mode = RMT_MODE_RX;
4848
config.channel = _channel;
4949
config.gpio_num = static_cast<gpio_num_t>(_pin);

0 commit comments

Comments
 (0)