observerconfig

package
v0.0.0-...-2489e1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Colors

type Colors struct {
	Target  *geometry.Color
	Other   *geometry.Color
	MidRect *geometry.Color
}

Colors stores colors of rectangles.

type ObserverConfig

type ObserverConfig struct {
	MidPoint image.Point
	MidRect  image.Rectangle
	ServoX   *Servo
	ServoY   *Servo
	Colors   *Colors

	Show             bool
	CalibrateOnStart bool
	Haar             []string
	MaxIdleDuration  float64
	MaxFPS           int
	Period           int
}

ObserverConfig represents a configuration of the Observer's runtime.

func LoadObserverConfig

func LoadObserverConfig(cfg *config.Config) *ObserverConfig

LoadObserverConfig generates an ObserverConfig and loads required attributes.

type Servo

type Servo struct {
	Pin          int64
	Calibration  float64
	Inverted     bool
	MidPoint     int
	Toleration   float64
	PxsPerDegree float64
}

Servo stores observer data of the servo engine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL