Skip to content

Commit

Permalink
Merge pull request #8 from josh3io/support-V1.5F
Browse files Browse the repository at this point in the history
add V1.5F support
  • Loading branch information
mwerezak authored Dec 29, 2022
2 parents ade1009 + 9f1a25a commit 7a63481
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions libtempered/temper_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct temper_type known_temper_types[]={
"TEMPerHumM12V1.0",
"TEMPerHumM12V1.2",
"TEMPerHumM12V1.3",
"TEMPer1F_H1V1.5F",
NULL
}
},
Expand Down Expand Up @@ -169,6 +170,37 @@ struct temper_type known_temper_types[]={
}
}
},
(struct temper_subtype*)&(struct temper_subtype_hid){
.base = {
.id = 4,
.name = "TEMPer1F_H1V1.5F",
.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_sht1x,
.get_humidity = tempered_type_hid_get_humidity_sht1x,
.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
}
},
Expand Down

0 comments on commit 7a63481

Please sign in to comment.