bill,

for hardware that can be configured to send data in different unit types, 
you have to either:

a) in the driver initialization, set the hardware to the units that you 
want, then hope that no one changes it while the station is running

or:

b) in every loop packet check the unit type for each observation, then 
convert (if necessary) to the units in the usUnits system of your loop 
packet

option b requires more calculation, but it is much more robust.  and unless 
your hardware sends data more frequently than 10 times a second (or even 
100 times a second?) it will have no affect on performance.

m

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/2bc371dc-68fe-4c2c-8350-b0c4893cc4dc%40googlegroups.com.

Reply via email to