|
@@ -7,6 +7,7 @@
|
|
|
const SensorType DHT11 = {
|
|
const SensorType DHT11 = {
|
|
|
.typename = "DHT11",
|
|
.typename = "DHT11",
|
|
|
.interface = &SINGLE_WIRE,
|
|
.interface = &SINGLE_WIRE,
|
|
|
|
|
+ .datatype = UT_DATA_TYPE_TEMP_HUM,
|
|
|
.pollingInterval = 2000,
|
|
.pollingInterval = 2000,
|
|
|
.allocator = unitemp_singlewire_alloc,
|
|
.allocator = unitemp_singlewire_alloc,
|
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
@@ -16,6 +17,7 @@ const SensorType DHT11 = {
|
|
|
const SensorType DHT12_SW = {
|
|
const SensorType DHT12_SW = {
|
|
|
.typename = "DHT12",
|
|
.typename = "DHT12",
|
|
|
.interface = &SINGLE_WIRE,
|
|
.interface = &SINGLE_WIRE,
|
|
|
|
|
+ .datatype = UT_DATA_TYPE_TEMP_HUM,
|
|
|
.pollingInterval = 2000,
|
|
.pollingInterval = 2000,
|
|
|
.allocator = unitemp_singlewire_alloc,
|
|
.allocator = unitemp_singlewire_alloc,
|
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
@@ -25,7 +27,8 @@ const SensorType DHT12_SW = {
|
|
|
const SensorType DHT21 = {
|
|
const SensorType DHT21 = {
|
|
|
.typename = "DHT21",
|
|
.typename = "DHT21",
|
|
|
.interface = &SINGLE_WIRE,
|
|
.interface = &SINGLE_WIRE,
|
|
|
- .pollingInterval = 2000,
|
|
|
|
|
|
|
+ .datatype = UT_DATA_TYPE_TEMP_HUM,
|
|
|
|
|
+ .pollingInterval = 1000,
|
|
|
.allocator = unitemp_singlewire_alloc,
|
|
.allocator = unitemp_singlewire_alloc,
|
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
|
.initializer = unitemp_singlewire_init,
|
|
.initializer = unitemp_singlewire_init,
|
|
@@ -34,6 +37,7 @@ const SensorType DHT21 = {
|
|
|
const SensorType DHT22 = {
|
|
const SensorType DHT22 = {
|
|
|
.typename = "DHT22",
|
|
.typename = "DHT22",
|
|
|
.interface = &SINGLE_WIRE,
|
|
.interface = &SINGLE_WIRE,
|
|
|
|
|
+ .datatype = UT_DATA_TYPE_TEMP_HUM,
|
|
|
.pollingInterval = 2000,
|
|
.pollingInterval = 2000,
|
|
|
.allocator = unitemp_singlewire_alloc,
|
|
.allocator = unitemp_singlewire_alloc,
|
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
@@ -43,6 +47,7 @@ const SensorType DHT22 = {
|
|
|
const SensorType AM2320_SW = {
|
|
const SensorType AM2320_SW = {
|
|
|
.typename = "AM2320",
|
|
.typename = "AM2320",
|
|
|
.interface = &SINGLE_WIRE,
|
|
.interface = &SINGLE_WIRE,
|
|
|
|
|
+ .datatype = UT_DATA_TYPE_TEMP_HUM,
|
|
|
.pollingInterval = 2000,
|
|
.pollingInterval = 2000,
|
|
|
.allocator = unitemp_singlewire_alloc,
|
|
.allocator = unitemp_singlewire_alloc,
|
|
|
.mem_releaser = unitemp_singlewire_free,
|
|
.mem_releaser = unitemp_singlewire_free,
|