From 9f1a25a781b21f567c7b0046ba4837e8240e9ad4 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 15 Aug 2017 04:51:44 +0000 Subject: [PATCH] add V1.5F support --- libtempered/temper_type.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/libtempered/temper_type.c b/libtempered/temper_type.c index 5cef273..23eb04c 100644 --- a/libtempered/temper_type.c +++ b/libtempered/temper_type.c @@ -40,6 +40,7 @@ struct temper_type known_temper_types[]={ "TEMPerHumM12V1.0", "TEMPerHumM12V1.2", "TEMPerHumM12V1.3", + "TEMPer1F_H1V1.5F", NULL } }, @@ -168,6 +169,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 } },