[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: TEMPer and TEMPerHUM usb thermometer driver
On 24 February 2010 14:52, Paul Goyette <paul%whooppee.com@localhost> wrote:
> On Wed, 24 Feb 2010, Andreas Gustafsson wrote:
>> Paul Goyette wrote:
>>> Thanks, plunky, for commiting the aprint's.
>>> As for the second problem (no sensors attached), can you rebuild with
>>> the following patch and see what it says?
>> I haven't actually built with that specific patch, but based on some
>> debug printfs I added, I conclude it would print nothing when
>> attaching uthum0, and print "sensor type 0 unknown" attaching uthum1.
>> More specifically, uthum0 is ignored because sc->sc_flen is 0. Then,
>> uthum1 is ignored because the signature read from the device in
>> uthum_check_sensortype() is 0x57 0x5a 0x14 0x00 0x14 0x00 0x53 0x00,
>> which matches neither of the two signatures the code checks for.
>> If I change uthum_check_sensortype() to accept the 0x57 0x5a 0x14 0x00
>> 0x14 0x00 0x53 0x00 and return UTHUM_TYPE_SHT1x, I get the following
>> output from envstat:
>> Current CritMax WarnMax WarnMin CritMin Unit
>> temp: 28.040 degC
>> humidity: 15483
> Yep. The signatures are the only way to figure out how to read the actual
> values. The temp looks "reasonable" here, although no way to tell if it is
> correct; humidity definitely looks wrong.
> I don't have any details on these devices. Let's hope tonio can help out.
If you do the conversion from OpenBSD's SENSOR_PERCENT, 15483 is
actually just 15% — perhaps still to dry to be totally reasonable, but
nonetheless theoretically possible. I've committed the fix.
Main Index |
Thread Index |