diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-09-25 15:45:21 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-09-25 15:45:21 +0200 |
commit | f927dc55953501e973328d2f125d97160a96c77c (patch) | |
tree | a7d8b66930b002afff23ff1dbd1ffb4d367a4cd7 /files/common/openwrt/sensors.module_lua | |
parent | core/ntp: add support for ref-clocks (diff) |
switch to pascal for pressure
Diffstat (limited to 'files/common/openwrt/sensors.module_lua')
-rw-r--r-- | files/common/openwrt/sensors.module_lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/common/openwrt/sensors.module_lua b/files/common/openwrt/sensors.module_lua index 4139f1aa..087ed7d5 100644 --- a/files/common/openwrt/sensors.module_lua +++ b/files/common/openwrt/sensors.module_lua @@ -209,7 +209,7 @@ function _M.iio_read_bmp280(bus, address) local tmp, err = _internal_.read_from_file(iio_device .. '/in_pressure_input') if tmp ~= nil then local val = base.tonumber(tmp) - if val ~= nil then values['pressure'] = val/100 end + if val ~= nil then values['pressure'] = val*1000 end end tmp, err = _internal_.read_from_file(iio_device .. '/in_temp_input') if tmp ~= nil then @@ -247,7 +247,7 @@ function _M.iio_read_bme280(bus, address) local tmp, err = _internal_.read_from_file(iio_device .. '/in_pressure_input') if tmp ~= nil then local val = base.tonumber(tmp) - if val ~= nil then values['pressure'] = val/100 end + if val ~= nil then values['pressure'] = val*1000 end end tmp, err = _internal_.read_from_file(iio_device .. '/in_temp_input') if tmp ~= nil then |