Skip to content

Commit

Permalink
Fix remaining misuses of °K and one KPa
Browse files Browse the repository at this point in the history
  • Loading branch information
maruel committed May 17, 2018
1 parent 2508cfc commit 0ac69d1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/apa102/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func mainImpl() error {

numPixels := flag.Int("n", 150, "number of pixels on the strip")
intensity := flag.Int("l", 127, "light intensity [1-255]")
temperature := flag.Int("t", 5000, "light temperature in °Kelvin [3500-7500]")
temperature := flag.Int("t", 5000, "light temperature in Kelvin [3500-7500]")
hz := flag.Int("hz", 0, "SPI port speed")
color := flag.String("color", "208020", "hex encoded color to show")
imgName := flag.String("img", "", "image to load")
Expand Down
2 changes: 1 addition & 1 deletion devices/apa102/apa102.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func ToRGB(p []color.NRGBA) []byte {
// there's 32 bits sent per LED, creating a staggered effect. See
// https://cpldcpu.wordpress.com/2014/11/30/understanding-the-apa102-superled/
//
// Temperature is in °Kelvin and a reasonable default value is 6500°K.
// Temperature is in Kelvin and a reasonable default value is 6500K.
//
// As per APA102-C spec, the chip's max refresh rate is 400hz.
// https://en.wikipedia.org/wiki/Flicker_fusion_threshold is a recommended
Expand Down
2 changes: 1 addition & 1 deletion devices/bmxx80/bmx280smoketest/bmx280smoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func run(i2cBus i2c.Bus, i2cAddr uint16, spiPort spi.PortCloser) (err error) {
if delta.Temperature > 1000 || delta.Temperature < -1000 {
return fmt.Errorf("Temperature delta higher than expected (%s): I²C got %s; SPI got %s", delta.Temperature, i2cEnv.Temperature, spiEnv.Temperature)
}
// 0.1KPa
// 0.1kPa
if delta.Pressure > 100 || delta.Pressure < -100 {
return fmt.Errorf("Pressure delta higher than expected (%s): I²C got %s; SPI got %s", delta.Pressure, i2cEnv.Pressure, spiEnv.Pressure)
}
Expand Down
2 changes: 1 addition & 1 deletion devices/lepton/cci/cci.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ type FFCMode struct {
ShutterTempLockoutState ShutterTempLockoutState // Default: ShutterTempLockoutStateInactive
ElapsedTimeSinceLastFFC time.Duration // Uptime
DesiredFFCPeriod time.Duration // Default: 300s
DesiredFFCTempDelta devices.Celsius // Default: 3°C
DesiredFFCTempDelta devices.Celsius // Default: 3K
ImminentDelay uint16 // Default: 52
VideoFreezeDuringFFC bool // Default: true
FFCDesired bool // Default: false
Expand Down
2 changes: 1 addition & 1 deletion devices/lepton/internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (d DurationMS) ToD() time.Duration {
return time.Duration(d) * time.Millisecond
}

// CentiK is temperature in 0.01°K
// CentiK is temperature in 0.01K
//
// It is an implementation detail of the protocol.
type CentiK uint16
Expand Down
4 changes: 2 additions & 2 deletions devices/lepton/lepton.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Metadata struct {
FFCTemp devices.Celsius // Temperature at last internal calibration.
FFCTempHousing devices.Celsius //
FFCState cci.FFCState // Current calibration state.
FFCDesired bool // Asserted at start-up, after period (default 3m) or after temperature change (default 3°K). Indicates that a calibration should be triggered as soon as possible.
FFCDesired bool // Asserted at start-up, after period (default 3m) or after temperature change (default 3K). Indicates that a calibration should be triggered as soon as possible.
Overtemp bool // true 10s before self-shutdown.
}

Expand All @@ -58,7 +58,7 @@ type Metadata struct {
// Values centered around 8192 accorging to camera body temperature. Effective
// range is 14 bits, so [0, 16383].
//
// Each 1 increment is approximatively 0.025°K.
// Each 1 increment is approximatively 0.025K.
type Frame struct {
*image.Gray16
Metadata Metadata // Metadata that is sent along the pixels.
Expand Down

0 comments on commit 0ac69d1

Please sign in to comment.