- bme280: fix hang in Halt() if SenseContinuous() listener is hung.
- bmp180: Add unit tests; increase test coverage to 96%.
- bmp180: Remove Reset(). There's no known use case.
- bmp180: Implement SenseContinuous().
- Consistently wrap errors in both packages.
- Various typos.
- devices: Add SenseContinuous() to Environmental.
- devices: Add Device to Display and Environmental.
- devices: Remove fmt.Stringer from Device.
- devices: Add more type assertions to variaous devices and corresponding unit test.
- bme280: Unexport the Standby parameter.
- bme280: Have SenseContinuous accept time.Duration period instead.
- bme280: Do not enable automatic sensing upon initialization.
- bme280: Use forced mode by default.
- bme280smoketest: improved.
As people like to copy paste code, make sure that the semantic of the variable
names is always relevant w.r.t. the object they refer to. In particular, do not
use 'bus' to refer to an spi.Port or spi.PortCloser, as this is blur the
distinction.
Also rename a few fooName to fooID.
This clarifies the difference on ownership and makes it clear that DevParams()
is essentially a 'connection factory'.
The flow is:
Bus -> Port -> Conn
Doing this caught inconsistencies in the unit tests. Made the structs in spitest
enforce the fact that DevParams() can only be called once.
In a follow up, I'll rename a lot of 'bus' to 'port' to be more consistent but
punting to not make this change unreviewable.
This shortens OpenByName() to Open() and removes OpenByNumber(). The concept of
number is not removed, it's still possible to open a bus by number, but a base10
string representation of the number is now needed. In practice, I haven't found
a real use for OpenByNumber().
This simplify the API surface, less functions leads to simpler to understand
API.
This is a breaking change.
This is a breaking change.
This is closer to how gpio behaves yet different in practice because of the
different challenges.
spi will be updated later to behave the same. Add support for aliases, which is
very useful, and it permits the CLI tools to accept a free form string to
specify the bus name.
- Increase test coverage of i2c and i2ctest to 100%.
- Add i2c.Pins implementation to i2ctest.Playback.
Ran:
git sed 's/pio/periph/g
git sed 's/gperiph/gpio/g'
git sed 's/Gperiph/Gpio/g'
git sed 's/PIO/Periph/g'
git sed 's/GPeriph/GPIO/g'
git mv pio.go periph.go
git mv pio_test.go periph_test.go
cd cmd
git mv pio-info periph-info
git mv pio-setup periph-setup
where 'git sed' is an alias to run sed over all files in git ls-files.
Fixes#11.