Re: Pressure sensors

2019-01-06 Thread Brett Lymn
On Wed, Jan 02, 2019 at 06:38:21PM +, David Holland wrote: > > Most of the world uses millibars and occasionally labels them hPa. It is hPa in .au > Since judging by the patch the framework isn't up to handling both, > the best course is probably to use and label as millibars and just > duck

Re: Pressure sensors

2019-01-04 Thread Ignatios Souvatzis
hi, On Wed, Jan 02, 2019 at 06:31:22PM -0800, John Nemeth wrote: > I'm pretty sure that millibars and hPa is metric as well. Yes, both are syntactic sugar for the SI unit. 1 Pa = 1 N / m² 1 bar = 10⁵ Pa. (1 bar happens to sound nice to old-schoolers, because it is slightly more than 1 % o

Re: Pressure sensors

2019-01-02 Thread David H. Gutteridge
On Wed, 2 Jan 2019, at 18:38:21 +, David Holland wrote: > On Tue, Jan 01, 2019 at 12:03:31PM -0500, Greg Troxel wrote: > > > my sensor does fill ->value_cur with mPa, so pressure does fit into the > > > "everything else"-else{} with ->cur_value / 100.0 for printout in > kPa. > > > > U

Re: Pressure sensors

2019-01-02 Thread Artturi Alm
On Wed, Jan 02, 2019 at 08:05:03PM -0500, Greg Troxel wrote: > Artturi Alm writes: > > > On Tue, Jan 01, 2019 at 12:03:31PM -0500, Greg Troxel wrote: > >> So, I wonder why you are choosing kPa vs hPa, and if that choice ends > >> up being a framework choice for everything. And how the rest of t

Re: Pressure sensors

2019-01-02 Thread Artturi Alm
On Tue, Jan 01, 2019 at 12:03:31PM -0500, Greg Troxel wrote: > Artturi Alm writes: > > > my sensor does fill ->value_cur with mPa, so pressure does fit into the > > "everything else"-else{} with ->cur_value / 100.0 for printout in kPa. > > Until very recently I had never seen pressure in kPa

Re: Pressure sensors

2019-01-02 Thread John Nemeth
On Jan 2, 6:38pm, David Holland wrote: } On Tue, Jan 01, 2019 at 12:03:31PM -0500, Greg Troxel wrote: } > > my sensor does fill ->value_cur with mPa, so pressure does fit into the } > > "everything else"-else{} with ->cur_value / 100.0 for printout in kPa. } > } > Until very recently I h

Re: Pressure sensors

2019-01-02 Thread Greg Troxel
Artturi Alm writes: > On Tue, Jan 01, 2019 at 12:03:31PM -0500, Greg Troxel wrote: >> So, I wonder why you are choosing kPa vs hPa, and if that choice ends >> up being a framework choice for everything. And how the rest of the >> world deals with this issue. > > By accident, i guess, and after

Re: Pressure sensors

2019-01-02 Thread Michael van Elst
mar...@duskware.de (Martin Husemann) writes: >I would make it Pa in the API and let userland translate to whatever >values we want to display by default. That would even support a large measuring range, common sensors have a resolution of 10-100 Pa. So unless you want to monitor a vacuum (10e-1..

Re: Pressure sensors

2019-01-02 Thread Konrad Schroder
At ${WORK} we frequently use single-digit milliTorr, as well as 1e-7 Torr or so, for lab measurements.  I'm not sure that you want to support sensors in that range; I'm just mentioning it in an attempt to quantify a possible use case. Take care, -Konrad On 1/2/19 11:31 AM, David Holland wro

Re: Pressure sensors

2019-01-02 Thread David Holland
On Wed, Jan 02, 2019 at 01:56:12PM -0500, Greg Troxel wrote: > > I would make it Pa in the API and let userland translate to whatever > > values we want to display by default. > > That seems somewhat reasonable, except that in my experience everybody > wants to see atmospheric pressure in mb/

Re: Pressure sensors

2019-01-02 Thread Greg Troxel
Martin Husemann writes: > On Wed, Jan 02, 2019 at 06:38:21PM +, David Holland wrote: >> Most of the world uses millibars and occasionally labels them hPa. >> Since judging by the patch the framework isn't up to handling both, >> the best course is probably to use and label as millibars and

Re: Pressure sensors

2019-01-02 Thread Martin Husemann
On Wed, Jan 02, 2019 at 06:38:21PM +, David Holland wrote: > Most of the world uses millibars and occasionally labels them hPa. > Since judging by the patch the framework isn't up to handling both, > the best course is probably to use and label as millibars and just > duck the occasional brickb

Re: Pressure sensors

2019-01-02 Thread David Holland
On Tue, Jan 01, 2019 at 12:03:31PM -0500, Greg Troxel wrote: > > my sensor does fill ->value_cur with mPa, so pressure does fit into the > > "everything else"-else{} with ->cur_value / 100.0 for printout in kPa. > > Until very recently I had never seen pressure in kPa. For atmospheric >

Re: Pressure sensors

2019-01-01 Thread Thor Lancelot Simon
On Mon, Dec 31, 2018 at 06:35:20PM +0200, Artturi Alm wrote: > Hi, > > i'd like to have the functionality given by the diff below, before > cleaning up another diff making use of it. LGTM - please make sure these are used as entropy sources, IIRC I hardcoded the sensor types when I originally did

Re: Pressure sensors

2019-01-01 Thread Greg Troxel
Artturi Alm writes: > my sensor does fill ->value_cur with mPa, so pressure does fit into the > "everything else"-else{} with ->cur_value / 100.0 for printout in kPa. Until very recently I had never seen pressure in kPa. For atmospheric pressure, the standard unit seems to be hPa. I realiz

Re: Pressure sensors

2018-12-31 Thread Christos Zoulas
In article <20181231163520.ga42...@gmail.com>, Artturi Alm wrote: >Hi, > >i'd like to have the functionality given by the diff below, before >cleaning up another diff making use of it. > >with "# envstat -Td bmx280temp0 -i 1" i get output like: > > Current Max Min Avg

Pressure sensors

2018-12-31 Thread Artturi Alm
Hi, i'd like to have the functionality given by the diff below, before cleaning up another diff making use of it. with "# envstat -Td bmx280temp0 -i 1" i get output like: Current Max Min Avg Unit temperature:25.070 25.070 25.060 25.067