- Merge PinForDifferenceOfChannels into PinForChannel.
- Make Channel a type.
- Rename ads1x15AnalogPin to analogPin, it was stuttering.
- Shorten few argument names.
- Remove one memory allocation in analogPin.
- Add a minimalistic unit test.
- Reduce (but to not eliminate yet) usage of fmt.
- Tweak documentation to optimize godoc output.
No functional change.
- Move private globals at the bottom of the file.
- Move ads1x15AnalogPin close to its methods.
- Stop using named return variable.
- Inline newADS1x15.
- Move gainConfig and gainVoltage as global variables.
- Wraps comments.
- Rename mutex to mu.
- Use -math.MaxInt16 instead of math.MinInt16 because of the voltage multiplier.
- Change error strings to start with a lower case.
Refactor to remove context.Context
Remove usage of t.Run.
Adds test case for Sense for 100% coverage
Removed signal.Notify's as signals do not always get delivered.
Fix documentation copy paste error.
Add Band stringer test.
Add Spectrum stringer test
Add Gain stringer test.
Add Gain stringer.
Add Spectrum stringer.
Add Band stringer.
Add check for gain value.
Add more test for Halt() conditions.
Move done channel creation within cancel mutex.
- apa102 benchmark used image.CMYK, which was added in go 1.5. This has the side
effect of making benchmark BenchmarkDrawSlowpath a bit faster.
- mpu9250 used type aliasing by accident, which was added in go1.9.
- periph-web used http.Server.Shutdown(), which was added in go1.8.
- precalculate clock idle polarity and remove clockOn()/clockOff()
- check for higher (unknown) modes and reject them
- move internal functions down, to be grouped together
- idle clock on Connect
- Handles clock-related Mode options for bitbanging SPI.
- Adds error handling for each errorable operation in spiConn.Tx
- Adds support for NoCS mode option
- Re-adds early catch for unhandled modes, now just HalfDuplex and
LSBFirst
Fixes#266
Used the following:
go get github.com/kisielk/errcheck
errcheck -ignore 'Close|rintf' ./...
While some are irrelevant, there were some genuine issues so this is worth
enforcing, hence a few innocuous places were 'fixed' so that the list could go
down to zero.
Do not enforce this in travis yet, but should be done soon.
Provides some basic functionality for initialization, self-test,
calibrarion and reading the gyroscope and accelerometer data.
Uses SPI interface, I2C is yet to be implemented via the separate
transport.
Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com>
The remainder is ALL_CAPS, underscores and golint confusion when multiple
exported variables are defined on a single line.
No functional change except one error string tweaked.
display: move devices.Display as display.Drawer
This removes the last interface from devices, which was misplaced due to
historical accident. The new package display will also be the location for an
interface for text output only devices.
Remove io.Writer from this interface. While it's a good performance optimization
for some drivers, it shouldn't be required.
Change Draw():
- Return an error, so that communication erorr can be surfaced correctly,
instead of an adhoc driver specific Err() method.
- Move go1.8+ test code using t.Run() into separate file conditionally compiled
on go1.8+. It's not a big deal to partially lose test coverage on <1.8 as long
as the main code runs fine.
- Run coverage before race checker to help get results faster.
- Fix typo.
- No need to run travis on recent versions, they are handed by gohci workers and
they are faster. :)
- Change DefaultOpts to be a struct instead of a function. This makes the godoc
much more descriptive.
- Change InputStatus() to accept a slice, so that the driver will be able to
eventually support the flavors cap1155 and cap1166.
This is borderline pedantic but enables 30*physic.MegaHertz which I think is
more readable than 30000000, reducing the risk of typos.
Do not change Stream.Resolution() gpiostream yet, but I'll likely change it too
to match in a follow up.
The idea is to enable navigating across the code more easily by using similar
layout amongs the drivers.
Similar to gofmt, it's not about making a stylistic choice, but having a single
style.
Use the following layout for drivers:
- exported support types
- Opts struct
- New func
- Dev struct and methods
- Private support code
No functional change.
A lot of code moved around, so it will likely break any pending PR or fork. :/
If the passed key is longer than 6 bytes, it will corrupt the access
bits for the trailing sector.
Fixed the bit calculation, updates tests.
Changed signatures to accept 6-byte long arrays instead of slices.
Minor typo for HD44780
Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com>