travis: start using misspell

- Otherwise typos continuously creep in.
- Fix misspellings found.
- Only run the binary check on 1.7.6, no need to run it everywhere.
pull/1/head
Marc-Antoine Ruel 7 years ago
parent ff89f66af2
commit a50f826642

@ -436,7 +436,7 @@ func (p *analogPin) ReadContinuous() <-chan analog.Sample {
case <-t.C: case <-t.C:
value, err := p.Read() value, err := p.Read()
if err != nil { if err != nil {
// In continous mode, we'll ignore errors silently. // In continuous mode, we'll ignore errors silently.
continue continue
} }
reading <- value reading <- value

@ -50,7 +50,7 @@ func Example() {
fmt.Println(reading) fmt.Println(reading)
// Read values continously from ADC. // Read values continuously from ADC.
fmt.Println("Continuous reading") fmt.Println("Continuous reading")
c := pin.ReadContinuous() c := pin.ReadContinuous()

@ -116,7 +116,7 @@ func (b Band) String() string {
// //
// Led Drive Current // Led Drive Current
// //
// The AS7262 provides a current limated intergated led drive circuit. Valid // The AS7262 provides a current-limited integrated led drive circuit. Valid
// limits for the drive current are 0mA, 12.5mA, 25mA, 50mA and 100mA. If non // limits for the drive current are 0mA, 12.5mA, 25mA, 50mA and 100mA. If non
// valid values are given the next lowest valid value is used. // valid values are given the next lowest valid value is used.
// //
@ -415,7 +415,7 @@ const (
// The as7262 registers are implemented as virtual registers pollStatus // The as7262 registers are implemented as virtual registers pollStatus
// provides a way to repeatedly check if there are any pending reads or writes // provides a way to repeatedly check if there are any pending reads or writes
// in the relevent buffer before a transaction while with a timeout. // in the relevant buffer before a transaction while with a timeout.
// Direction is used to set which buffer is being polled to be ready. // Direction is used to set which buffer is being polled to be ready.
func (d *Dev) pollStatus(ctx context.Context, dir direction) error { func (d *Dev) pollStatus(ctx context.Context, dir direction) error {
timeout := time.NewTimer(sensorTimeout) timeout := time.NewTimer(sensorTimeout)
@ -517,10 +517,10 @@ const (
// Bank 2 consists of data from the G, Y, O, R photodiodes. // Bank 2 consists of data from the G, Y, O, R photodiodes.
bank2 mode = 0x04 bank2 mode = 0x04
// AllContinuously gets data from both banks continuously, requires 2x // AllContinuously gets data from both banks continuously, requires 2x
// the intergration time. // the integration time.
allContinuously mode = 0x08 allContinuously mode = 0x08
// AllOneShot gets data from both banks once, and set the data ready bit in // AllOneShot gets data from both banks once, and set the data ready bit in
// the status control register when complete requires 2x the intergration // the status control register when complete requires 2x the integration
// time. // time.
allOneShot mode = 0x0c allOneShot mode = 0x0c
) )

@ -792,7 +792,7 @@ func TestNew(t *testing.T) {
want2 gpio.PinIn want2 gpio.PinIn
wantErr bool wantErr bool
}{ }{
{name: "defautls", {name: "defaults",
opts: DefaultOpts, opts: DefaultOpts,
want1: G1x, want1: G1x,
want2: nil, want2: nil,

@ -200,7 +200,7 @@ var sensorTestCaseValidRead = []i2ctest.IO{
{Addr: 0x49, W: []byte{statusReg}, R: []byte{0x00}}, {Addr: 0x49, W: []byte{statusReg}, R: []byte{0x00}},
} }
// Same as sensorTestCaseValidRead but omiting polling for data ready. // Same as sensorTestCaseValidRead but omitting polling for data ready.
var sensorTestCaseInteruptValidRead = []i2ctest.IO{ var sensorTestCaseInteruptValidRead = []i2ctest.IO{
{Addr: 0x49, W: []byte{statusReg}, R: []byte{0x00}}, {Addr: 0x49, W: []byte{statusReg}, R: []byte{0x00}},
{Addr: 0x49, W: []byte{writeReg, 0x85}, R: []byte{}}, {Addr: 0x49, W: []byte{writeReg, 0x85}, R: []byte{}},

@ -240,8 +240,9 @@ func (d *Dev) SetEnvironmentData(temp, humidity float32) error {
return nil return nil
} }
// GetBaseline provides current baseline used by internal measurement alogrithm. // GetBaseline provides current baseline used by internal measurement algorithm.
// For better understanding how to use this value, check the SetBaseline and documentation. // For better understanding how to use this value, check the SetBaseline and
// documentation.
func (d *Dev) GetBaseline() ([]byte, error) { func (d *Dev) GetBaseline() ([]byte, error) {
r := make([]byte, 2) r := make([]byte, 2)
if err := d.c.Tx([]byte{baselineReg}, r); err != nil { if err := d.c.Tx([]byte{baselineReg}, r); err != nil {
@ -330,7 +331,7 @@ func (d *Dev) Sense(values *SensorValues) error {
return d.SensePartial(ReadAll, values) return d.SensePartial(ReadAll, values)
} }
// SensePartial provides marginaly more efficient reading from the sensor. // SensePartial provides marginally more efficient reading from the sensor.
// You can specify what subset of data you want through NeededData constants. // You can specify what subset of data you want through NeededData constants.
func (d *Dev) SensePartial(requested NeededData, values *SensorValues) error { func (d *Dev) SensePartial(requested NeededData, values *SensorValues) error {
read := make([]byte, requested) read := make([]byte, requested)

@ -1428,7 +1428,7 @@ func (m *MPU9250) GetClockSource() (byte, error) {
return m.transport.readMaskedReg(reg.MPU9250_PWR_MGMT_1, reg.MPU9250_CLKSEL_MASK) return m.transport.readMaskedReg(reg.MPU9250_PWR_MGMT_1, reg.MPU9250_CLKSEL_MASK)
} }
// GetDeviceID Returns the devide ID // GetDeviceID Returns the device ID
func (m *MPU9250) GetDeviceID() (byte, error) { func (m *MPU9250) GetDeviceID() (byte, error) {
return m.transport.readByte(reg.MPU9250_WHO_AM_I) return m.transport.readByte(reg.MPU9250_WHO_AM_I)
} }

@ -114,9 +114,9 @@ const (
MPU9250_ZA_OFFSET_L = 0x7E MPU9250_ZA_OFFSET_L = 0x7E
//reset values //reset values
WHOAMI_RESET_VAL = 0x71 WHOAMI_RESET_VAL = 0x71
POWER_MANAGMENT_1_RESET_VAL = 0x01 POWER_MANAGEMENT_1_RESET_VAL = 0x01
DEFAULT_RESET_VALUE = 0x00 DEFAULT_RESET_VALUE = 0x00
WHOAMI_DEFAULT_VAL = 0x68 WHOAMI_DEFAULT_VAL = 0x68

@ -116,7 +116,7 @@ func TestRegisterPorts(t *testing.T) {
t.Fatalf("failed to create I²C mux: %v", err) t.Fatalf("failed to create I²C mux: %v", err)
} }
if _, err := mux.RegisterPorts(tt.alias); err == nil { if _, err := mux.RegisterPorts(tt.alias); err == nil {
t.Fatal("expected second registraion to fail", err) t.Fatal("expected second registration to fail", err)
} }
for i, port := range tt.expect { for i, port := range tt.expect {
if err := i2creg.Unregister(port); err != nil { if err := i2creg.Unregister(port); err != nil {

@ -26,7 +26,7 @@ type Servo struct {
maxAngle physic.Angle maxAngle physic.Angle
} }
// NewServoGroup returns a servo group connected throught the pca9685 module // NewServoGroup returns a servo group connected through the pca9685 module
// some pwm and angle limits can be set // some pwm and angle limits can be set
func NewServoGroup(dev *Dev, minPwm, maxPwm gpio.Duty, minAngle, maxAngle physic.Angle) *ServoGroup { func NewServoGroup(dev *Dev, minPwm, maxPwm gpio.Duty, minAngle, maxAngle physic.Angle) *ServoGroup {
return &ServoGroup{ return &ServoGroup{

@ -72,7 +72,7 @@ func (d *Dev) Switch(channel int, state bool) error {
return d.updateStates() return d.updateStates()
} }
// SwitchAll switches all channels accoring to the state (on/off). // SwitchAll switches all channels according to the state (on/off).
func (d *Dev) SwitchAll(state bool) error { func (d *Dev) SwitchAll(state bool) error {
for i := 0; i < 18; i++ { for i := 0; i < 18; i++ {
d.on[i] = state d.on[i] = state

Loading…
Cancel
Save