Documentation ¶
Overview ¶
Package cci declares the Camera Command Interface to interact with a FLIR Lepton over I²C.
This protocol controls and queries the camera but is not used to read the images.
Datasheet ¶
Index ¶
- type CameraStatus
- type Dev
- func (d *Dev) GetFFCModeControl() (*FFCMode, error)
- func (d *Dev) GetSerial() (uint64, error)
- func (d *Dev) GetShutterPos() (ShutterPos, error)
- func (d *Dev) GetStatus() (*Status, error)
- func (d *Dev) GetTemp() (devices.Celsius, error)
- func (d *Dev) GetTempHousing() (devices.Celsius, error)
- func (d *Dev) GetUptime() (time.Duration, error)
- func (d *Dev) Halt() error
- func (d *Dev) Init() error
- func (d *Dev) RunFFC() error
- func (d *Dev) WaitIdle() (StatusBit, error)
- type FFCMode
- type FFCShutterMode
- type FFCState
- type ShutterPos
- type ShutterTempLockoutState
- type Status
- type StatusBit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CameraStatus ¶
type CameraStatus uint32
CameraStatus returns the status of the FLIR Lepton's camera.
const ( SystemReady CameraStatus = 0 SystemInitializing CameraStatus = 1 SystemInLowPowerMode CameraStatus = 2 SystemGoingIntoStandby CameraStatus = 3 SystemFlatFieldInProcess CameraStatus = 4 )
Valid values for CameraStatus.
func (CameraStatus) String ¶
func (i CameraStatus) String() string
type Dev ¶
type Dev struct {
// contains filtered or unexported fields
}
Dev is the Lepton specific Command and Control Interface (CCI).
Dev can safely accessed concurrently via multiple goroutines.
This interface is accessed via I²C and provides access to view and modify the internal state.
Maximum I²C speed is 1Mhz.
func (*Dev) GetFFCModeControl ¶
GetFFCModeControl returns the internal state with regards to calibration.
func (*Dev) GetShutterPos ¶
func (d *Dev) GetShutterPos() (ShutterPos, error)
GetShutterPos returns the position of the shutter if present.
func (*Dev) GetTempHousing ¶
GetTempHousing returns the temperature of the camera housing.
func (*Dev) Init ¶
Init initializes the FLIR Lepton in raw 14 bits mode, enables telemetry as header.
type FFCMode ¶
type FFCMode struct { FFCShutterMode FFCShutterMode // Default: FFCShutterModeExternal ShutterTempLockoutState ShutterTempLockoutState // Default: ShutterTempLockoutStateInactive ElapsedTimeSinceLastFFC time.Duration // Uptime DesiredFFCPeriod time.Duration // Default: 300s DesiredFFCTempDelta devices.Celsius // Default: 3°C ImminentDelay uint16 // Default: 52 VideoFreezeDuringFFC bool // Default: true FFCDesired bool // Default: false ExplicitCommandToOpen bool // Default: false }
FFCMode
type FFCShutterMode ¶
type FFCShutterMode uint32
FFCShutterMode is used in FFCMode.
const ( FFCShutterModeManual FFCShutterMode = 0 FFCShutterModeAuto FFCShutterMode = 1 FFCShutterModeExternal FFCShutterMode = 2 )
Valid values for FFCShutterMode.
func (FFCShutterMode) String ¶
func (i FFCShutterMode) String() string
type ShutterPos ¶
type ShutterPos uint32
ShutterPos returns the shutter position, which is used to calibrate the camera.
const ( ShutterPosUnknown ShutterPos = 0xFFFFFFFF // -1 ShutterPosIdle ShutterPos = 0 ShutterPosOpen ShutterPos = 1 ShutterPosClosed ShutterPos = 2 ShutterPosBrakeOn ShutterPos = 3 )
Valid values for ShutterPos.
func (ShutterPos) String ¶
func (i ShutterPos) String() string
type ShutterTempLockoutState ¶
type ShutterTempLockoutState uint32
ShutterTempLockoutState is used in FFCMode.
const ( ShutterTempLockoutStateInactive ShutterTempLockoutState = 0 ShutterTempLockoutStateHigh ShutterTempLockoutState = 1 ShutterTempLockoutStateLow ShutterTempLockoutState = 2 )
Valid values for ShutterTempLockoutState.
func (ShutterTempLockoutState) String ¶
func (i ShutterTempLockoutState) String() string
type Status ¶
type Status struct { CameraStatus CameraStatus CommandCount uint16 }
Status returns the camera status as returned by the camera.