Commit Graph

8 Commits

Author SHA1 Message Date
Ayke van Laethem 6763521eff all: introduce a temperature type
This type should be used whenever a sensor (or actuator?) works with a
temperature. For example, this commit changes the signature:

    ReadTemperature() (int32, error)

to the following:

    ReadTemperature() (drivers.Temperature, error)

I believe this is much clearer in intent. It also makes it trivial to
introduce common conversions. For example, there are already Celsius()
and Fahrenheit() methods to convert to the given units, as a floating
point. More units could be added as needed, for example a CelsiusInt().
2021-10-21 23:25:42 +02:00
deadprogram db02cbb8a4 i2c: switch all i2c drivers definitions to use i2c bus interface type instead of machine package concrete type
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-08-29 17:19:27 +02:00
Alan Wang 5ebc7cb09e bmp180: fix temperature type conversion 2020-07-07 23:47:38 +02:00
Daniel Esteban 0519540d0c fix celsius symbol 2020-02-08 19:54:31 +01:00
Ron Evans c09f0a8075 all: switch to using custom domain for all drivers
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-05-29 13:33:50 +02:00
Ron Evans cd992bd7d6 bmp180: change method names/signature for obtaining temperature and pressure uniform with other similar drivers
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-04-24 15:17:26 +02:00
Ron Evans d9b426b90b i2c: refactor all i2c drivers to use Address property of Driver. Allows variations to override the default address as discussed in #14 (#30)
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-04-07 10:50:34 +02:00
Daniel Esteban 3af2f18437 Initial support for BMP180 digital pressure sensor (#11)
* Initial support for BMP180 digital pressure sensor
Note that Pressure & Temperature return int32 and millis unit (millidegrees
and mPa)
2019-02-06 08:50:40 +01:00