Fix remaining misuses of °K and one KPa

pull/1/head
Marc-Antoine Ruel 8 years ago
parent 7abb5ac69e
commit 84ee99bd88

@ -32,7 +32,7 @@ func ToRGB(p []color.NRGBA) []byte {
// there's 32 bits sent per LED, creating a staggered effect. See // there's 32 bits sent per LED, creating a staggered effect. See
// https://cpldcpu.wordpress.com/2014/11/30/understanding-the-apa102-superled/ // 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. // As per APA102-C spec, the chip's max refresh rate is 400hz.
// https://en.wikipedia.org/wiki/Flicker_fusion_threshold is a recommended // https://en.wikipedia.org/wiki/Flicker_fusion_threshold is a recommended

@ -175,7 +175,7 @@ func run(i2cBus i2c.Bus, i2cAddr uint16, spiPort spi.PortCloser) (err error) {
if delta.Temperature > 1000 || delta.Temperature < -1000 { 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) 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 { 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) return fmt.Errorf("Pressure delta higher than expected (%s): I²C got %s; SPI got %s", delta.Pressure, i2cEnv.Pressure, spiEnv.Pressure)
} }

@ -132,7 +132,7 @@ type FFCMode struct {
ShutterTempLockoutState ShutterTempLockoutState // Default: ShutterTempLockoutStateInactive ShutterTempLockoutState ShutterTempLockoutState // Default: ShutterTempLockoutStateInactive
ElapsedTimeSinceLastFFC time.Duration // Uptime ElapsedTimeSinceLastFFC time.Duration // Uptime
DesiredFFCPeriod time.Duration // Default: 300s DesiredFFCPeriod time.Duration // Default: 300s
DesiredFFCTempDelta devices.Celsius // Default: 3°C DesiredFFCTempDelta devices.Celsius // Default: 3K
ImminentDelay uint16 // Default: 52 ImminentDelay uint16 // Default: 52
VideoFreezeDuringFFC bool // Default: true VideoFreezeDuringFFC bool // Default: true
FFCDesired bool // Default: false FFCDesired bool // Default: false

@ -30,7 +30,7 @@ func (d DurationMS) ToD() time.Duration {
return time.Duration(d) * time.Millisecond 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. // It is an implementation detail of the protocol.
type CentiK uint16 type CentiK uint16

@ -48,7 +48,7 @@ type Metadata struct {
FFCTemp devices.Celsius // Temperature at last internal calibration. FFCTemp devices.Celsius // Temperature at last internal calibration.
FFCTempHousing devices.Celsius // FFCTempHousing devices.Celsius //
FFCState cci.FFCState // Current calibration state. 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. Overtemp bool // true 10s before self-shutdown.
} }
@ -58,7 +58,7 @@ type Metadata struct {
// Values centered around 8192 accorging to camera body temperature. Effective // Values centered around 8192 accorging to camera body temperature. Effective
// range is 14 bits, so [0, 16383]. // 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 { type Frame struct {
*image.Gray16 *image.Gray16
Metadata Metadata // Metadata that is sent along the pixels. Metadata Metadata // Metadata that is sent along the pixels.

Loading…
Cancel
Save