mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
grove.cxx: fix with 10bit ADC numbers
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
parent
13814f78d8
commit
da59216663
@ -79,7 +79,6 @@ GroveTemp::~GroveTemp()
|
||||
int GroveTemp::value ()
|
||||
{
|
||||
int a = mraa_aio_read(m_aio);
|
||||
a = a >> 2;
|
||||
float r = (float)(1023-a)*10000/a;
|
||||
float t = 1/(log(r/10000)/3975 + 1/298.15)-273.15;
|
||||
return (int) t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user