Fix a ton of golint messages.

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.
pull/1/head
Marc-Antoine Ruel 8 years ago
parent 501558c627
commit e634bc9fab

@ -931,7 +931,7 @@ func BenchmarkCalibration280Float64(b *testing.B) {
// //
var epsilon float64 = 0.000000001 const epsilon = 0.000000001
func floatEqual(a, b float64) bool { func floatEqual(a, b float64) bool {
return (a-b) < epsilon && (b-a) < epsilon return (a-b) < epsilon && (b-a) < epsilon

@ -125,9 +125,7 @@ const (
F16 Filter = 4 F16 Filter = 4
) )
// DefaultsOpts returns the default options used. // DefaultOpts is the recommended default options.
//
// Defaults to use O4x (4x oversampling) for all measurements.
var DefaultOpts = Opts{ var DefaultOpts = Opts{
Temperature: O4x, Temperature: O4x,
Pressure: O4x, Pressure: O4x,

@ -13,6 +13,7 @@ import (
// SamplingTime determines the time to make a single sample. // SamplingTime determines the time to make a single sample.
type SamplingTime uint8 type SamplingTime uint8
// Valid SamplingTime values.
const ( const (
S320us SamplingTime = 0 S320us SamplingTime = 0
S640us SamplingTime = 1 S640us SamplingTime = 1
@ -24,6 +25,7 @@ const (
// AvgSampling set the number of samples per measurement that get averaged. // AvgSampling set the number of samples per measurement that get averaged.
type AvgSampling uint8 type AvgSampling uint8
// Valid AvgSampling values.
const ( const (
// Avg1 means that 1 sample is taken per measurement // Avg1 means that 1 sample is taken per measurement
Avg1 AvgSampling = iota // 0 Avg1 AvgSampling = iota // 0
@ -40,7 +42,7 @@ const (
// normal operation. // normal operation.
type CycleTime uint8 type CycleTime uint8
// Possible cycle time values. (written as 2 bits) // Valid CycleTime values.
const ( const (
C35ms CycleTime = iota // 0 C35ms CycleTime = iota // 0
C70ms // default C70ms // default
@ -52,7 +54,7 @@ const (
// recalibration. // recalibration.
type MaxDur uint8 type MaxDur uint8
// Possible touch duration values. (written as 4 bits) // Valid MaxDur values.
const ( const (
MaxDur560ms MaxDur = iota MaxDur560ms MaxDur = iota
MaxDur840ms MaxDur840ms

Loading…
Cancel
Save