From 3b1e3eb73101c8b5bb485306177cd482d188ee2e Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 21 Dec 2023 19:40:48 +0000 Subject: New TEMPerGold sensor; reported by Mikolaj Kucharski on bugs@ --- sys/dev/usb/ugold.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/dev/usb/ugold.c b/sys/dev/usb/ugold.c index 7f7dfad213c..c761e5a9f1a 100644 --- a/sys/dev/usb/ugold.c +++ b/sys/dev/usb/ugold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugold.c,v 1.26 2023/12/10 19:03:37 miod Exp $ */ +/* $OpenBSD: ugold.c,v 1.27 2023/12/21 19:40:47 miod Exp $ */ /* * Copyright (c) 2013 Takayoshi SASANO @@ -498,8 +498,14 @@ ugold_si700x_type(struct ugold_softc *sc) /* TEMPerGold prefix */ if (sc->sc_model_len >= 11 && memcmp(sc->sc_model, "TEMPerGold_", 11) == 0) { + /* + * All V3.something models ought to work, but better be + * safe than sorry, and TEMPerHum models have been known + * to use slightly different sensors between models. + */ if (memcmp(sc->sc_model + 11, "V3.1 ", 16 - 11) == 0 || - memcmp(sc->sc_model + 11, "V3.4 ", 16 - 11) == 0) { + memcmp(sc->sc_model + 11, "V3.4 ", 16 - 11) == 0 || + memcmp(sc->sc_model + 11, "V3.5 ", 16 - 11) == 0) { sc->sc_type = UGOLD_TYPE_GOLD; sc->sc_num_sensors = 1; descr = "gold (temperature only)"; -- cgit v1.2.3