pkg

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const FanControl = 18
View Source
const LedClock int = 14
View Source
const LedData int = 15
View Source
const MaxTemp = 80
View Source
const MinTemp = 35

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port            int
	CpuOffThreshold float64
	CpuOnThreshold  float64
	OffThreshold    float64
	OnThreshold     float64
	ExtendedColors  bool
	Delay           uint64
	Brightness      float64
	Verbose         bool
}

func LoadConfig

func LoadConfig() *Config

type FakeFanshim

type FakeFanshim struct {
}

func (*FakeFanshim) Cleanup

func (f *FakeFanshim) Cleanup()

func (*FakeFanshim) Off

func (f *FakeFanshim) Off()

func (*FakeFanshim) On

func (f *FakeFanshim) On()

func (*FakeFanshim) SetColor

func (f *FakeFanshim) SetColor(color colorful.Color)

type Fanshim

type Fanshim interface {
	On()
	Off()
	SetColor(color colorful.Color)
	Cleanup()
}

func NewFakeFanshim

func NewFakeFanshim() Fanshim

func NewGPIOFanshim

func NewGPIOFanshim() Fanshim

type FanshimController

type FanshimController struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(config *Config, fanshim Fanshim) *FanshimController

func (*FanshimController) Cleanup

func (f *FanshimController) Cleanup()

func (*FanshimController) Update

func (f *FanshimController) Update(temperature, cpu float64)

type GPIOFanshim

type GPIOFanshim struct {
	// contains filtered or unexported fields
}

func (*GPIOFanshim) Cleanup

func (f *GPIOFanshim) Cleanup()

func (*GPIOFanshim) Off

func (f *GPIOFanshim) Off()

func (*GPIOFanshim) On

func (f *GPIOFanshim) On()

func (*GPIOFanshim) SetColor

func (f *GPIOFanshim) SetColor(color colorful.Color)

type Led

type Led struct {
	// contains filtered or unexported fields
}

func (*Led) Clear

func (bl *Led) Clear()

func (*Led) SetBrightness

func (bl *Led) SetBrightness(brightness float64) *Led

func (*Led) SetPixel

func (bl *Led) SetPixel(r int, g int, b int)

Jump to

Keyboard shortcuts

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