From e36f590bd23df52da5edc486e3186c33d47a7027 Mon Sep 17 00:00:00 2001 From: miod Date: Fri, 8 Dec 2023 06:33:48 +0000 Subject: [PATCH] New TEMPerHUM sensor; reported by Mikolaj Kucharski on bugs@ --- share/man/man4/ugold.4 | 5 +++-- sys/dev/usb/ugold.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man4/ugold.4 b/share/man/man4/ugold.4 index 78e328ac72c..43df0892d03 100644 --- a/share/man/man4/ugold.4 +++ b/share/man/man4/ugold.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ugold.4,v 1.8 2023/11/30 20:08:23 miod Exp $ +.\" $OpenBSD: ugold.4,v 1.9 2023/12/08 06:33:48 miod Exp $ .\" .\" Copyright (c) 2013 Takayoshi SASANO .\" Copyright (c) 2013 Martin Pieuchot @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 30 2023 $ +.Dd $Mdocdate: December 8 2023 $ .Dt UGOLD 4 .Os .Sh NAME @@ -41,6 +41,7 @@ driver: .It Li "RDing TEMPerGold_V3.4" Ta "1 Temperature" .It Li "RDing TEMPerHum1V1.0" Ta "1 Temperature and 1 Humidity" .It Li "RDing TEMPerHum1V1.2" Ta "1 Temperature and 1 Humidity" +.It Li "RDing TEMPerHUM_V3.9" Ta "1 Temperature and 1 Humidity" .It Li "RDing TEMPerHUM_V4.0" Ta "1 Temperature and 1 Humidity" .It Li "RDing TEMPer1F_H1V1.5F" Ta "1 Temperature and 1 Humidity" .It Li "RDing TEMPerX_V3.1" Ta "1 Temperature and 1 Humidity" diff --git a/sys/dev/usb/ugold.c b/sys/dev/usb/ugold.c index a5bd162e4e1..9d1a30b2da8 100644 --- a/sys/dev/usb/ugold.c +++ b/sys/dev/usb/ugold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugold.c,v 1.24 2023/11/30 20:08:23 miod Exp $ */ +/* $OpenBSD: ugold.c,v 1.25 2023/12/08 06:33:48 miod Exp $ */ /* * Copyright (c) 2013 Takayoshi SASANO @@ -453,7 +453,8 @@ ugold_si700x_type(struct ugold_softc *sc) } if (sc->sc_model_len >= 9 && memcmp(sc->sc_model, "TEMPerHUM", 9) == 0) { - if (memcmp(sc->sc_model + 9, "_V4.0 ", 16 - 9) == 0) { + if (memcmp(sc->sc_model + 9, "_V3.9 ", 16 - 9) == 0 || + memcmp(sc->sc_model + 9, "_V4.0 ", 16 - 9) == 0) { sc->sc_type = UGOLD_TYPE_TEMPERX; descr = "temperx (temperature and humidity)"; goto identified; -- 2.20.1