controller

package
v0.0.0-...-5fd2d9c Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitializationSequenceMutex sync.Mutex

Functions

This section is empty.

Types

type FanController

type FanController interface {
	// Run starts the control loop
	Run(ctx context.Context) error

	GetFanId() string

	GetStatistics() FanControllerStatistics

	// RunInitializationSequence for the given fan to determine its characteristics
	RunInitializationSequence() (err error)

	UpdateFanSpeed() error
}

func NewFanController

func NewFanController(
	persistence persistence.Persistence,
	fan fans.Fan,
	pidLoop util.PidLoop,
	updateRate time.Duration,
) FanController

type FanControllerStatistics

type FanControllerStatistics struct {
	UnexpectedPwmValueCount int
	IncreasedMinPwmCount    int
	MinPwmOffset            int
}

type PidFanController

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

func (*PidFanController) GetFanId

func (f *PidFanController) GetFanId() string

func (*PidFanController) GetStatistics

func (f *PidFanController) GetStatistics() FanControllerStatistics

func (*PidFanController) Run

func (f *PidFanController) Run(ctx context.Context) error

func (*PidFanController) RunInitializationSequence

func (f *PidFanController) RunInitializationSequence() (err error)

func (*PidFanController) UpdateFanSpeed

func (f *PidFanController) UpdateFanSpeed() error

Jump to

Keyboard shortcuts

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