Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SmartHome
NodeManager_GasSensor
Commits
dc1ad1d1
Commit
dc1ad1d1
authored
Apr 04, 2017
by
user2684
Browse files
DHT object is always initialized to DHT22 #39
parent
3e3cf8d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
NodeManager.cpp
View file @
dc1ad1d1
...
...
@@ -1080,8 +1080,8 @@ int NodeManager::registerSensor(int sensor_type, int pin, int child_id) {
#endif
#if MODULE_DHT == 1
else
if
(
sensor_type
==
SENSOR_DHT11
||
sensor_type
==
SENSOR_DHT22
)
{
DHT
*
dht
=
new
DHT
(
pin
,
DHT22
);
int
dht_type
=
sensor_type
==
SENSOR_DHT11
?
DHT11
:
DHT22
;
DHT
*
dht
=
new
DHT
(
pin
,
dht_type
);
registerSensor
(
new
SensorDHT
(
child_id
,
pin
,
dht
,
0
,
dht_type
));
child_id
=
_getAvailableChildId
();
return
registerSensor
(
new
SensorDHT
(
child_id
,
pin
,
dht
,
1
,
dht_type
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment