Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TEMPerHumM12V1.2 and TEMPerHumM12V1.3 #40

Open
wants to merge 2 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Add support for 0C45:7402 TEMPerHumM12V1.3, which uses a si7021 IC

Added support for "TEMPerHumM12V1.3" devices which use the si7021 IC

Signed-off-by: Dave T <davet2001@hotmail.com>
  • Loading branch information
davet2001 authored and nmenon committed Mar 19, 2016
commit eccb950f2179c01b5893f52a215e0bb94b1a19a4
@@ -39,6 +39,7 @@ struct temper_type known_temper_types[]={
"TEMPerHumV1.0rHu",
"TEMPerHumM12V1.0",
"TEMPerHumM12V1.2",
"TEMPerHumM12V1.3",
NULL
}
},
@@ -136,6 +137,37 @@ struct temper_type known_temper_types[]={
}
}
},
(struct temper_subtype*)&(struct temper_subtype_hid){
.base = {
.id = 3,
.name = "TEMPerHumM12V1.3",
.open = tempered_type_hid_subtype_open,
.read_sensors = tempered_type_hid_read_sensors,
.get_temperature = tempered_type_hid_get_temperature,
.get_humidity = tempered_type_hid_get_humidity
},
.sensor_group_count = 1,
.sensor_groups = (struct tempered_type_hid_sensor_group[]){
{
.query = {
.length = 9,
.data = (unsigned char[]){ 0, 1, 0x80, 0x33, 1, 0, 0, 0, 0 }
},
.read_sensors = tempered_type_hid_read_sensor_group,
.sensor_count = 1,
.sensors = (struct tempered_type_hid_sensor[]){
{
.get_temperature = tempered_type_hid_get_temperature_si7021,
.get_humidity = tempered_type_hid_get_humidity_si7021,
.temperature_high_byte_offset = 2,
.temperature_low_byte_offset = 3,
.humidity_high_byte_offset = 4,
.humidity_low_byte_offset = 5
}
}
}
}
},
NULL // List terminator for subtypes
}
},
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.