-
Notifications
You must be signed in to change notification settings - Fork 6
/
periphtypes.go
36 lines (27 loc) · 1021 Bytes
/
periphtypes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2020 The Cacophony Project. All rights reserved.
// Use of this source code is governed by the Apache License Version 2.0;
// see the LICENSE file for further details.
// This file mirrors some types and consts from periph.io.
package lepton3
import (
"periph.io/x/periph/devices"
"periph.io/x/periph/devices/lepton/cci"
)
type FFCShutterMode = cci.FFCShutterMode
const (
FFCShutterModeManual = cci.FFCShutterModeManual
FFCShutterModeAuto = cci.FFCShutterModeAuto
FFCShutterModeExternal = cci.FFCShutterModeExternal
)
type FFCMode = cci.FFCMode
const (
ShutterTempLockoutStateInactive = cci.ShutterTempLockoutStateInactive
ShutterTempLockoutStateHigh = cci.ShutterTempLockoutStateHigh
ShutterTempLockoutStateLow = cci.ShutterTempLockoutStateLow
)
type Celsius = devices.Celsius
// CelsiusFromFloat creates a new Celsius from a floating point
// value. This is used for temperature fields in FFCMode.
func CelsiusFromFloat(c float64) Celsius {
return Celsius(int(c * 1000))
}