mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
define an empty constructor and overload DHT::begin
This commit is contained in:
parent
e375a0b11f
commit
97d11f3fd5
4
DHT.cpp
4
DHT.cpp
@ -41,8 +41,8 @@ DHT::DHT() {
|
|||||||
// initialize members _pin and _type in the class definition.
|
// initialize members _pin and _type in the class definition.
|
||||||
// They can be modified via DHT::begin(uint8_t pin, uint8_t type, uint8_t usec).
|
// They can be modified via DHT::begin(uint8_t pin, uint8_t type, uint8_t usec).
|
||||||
#ifdef __AVR
|
#ifdef __AVR
|
||||||
_bit = digitalPinToBitMask(pin);
|
_bit = digitalPinToBitMask(_pin);
|
||||||
_port = digitalPinToPort(pin);
|
_port = digitalPinToPort(_pin);
|
||||||
#endif
|
#endif
|
||||||
_maxcycles = microsecondsToClockCycles(1000); // 1 millisecond timeout for
|
_maxcycles = microsecondsToClockCycles(1000); // 1 millisecond timeout for
|
||||||
// reading pulses from DHT sensor.
|
// reading pulses from DHT sensor.
|
||||||
|
Loading…
Reference in New Issue
Block a user