hysteresis

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrAlreadyRunning   = Error("pid is already running")
	ErrThermometerIsNil = Error("thermometer is nil")
	ErrActuatorIsNil    = Error("actuator is nil")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(thermometer device.Thermometer, chiller, heater device.Actuator,
	chillingDifferential, heatingDifferential float64,
	logger *logrus.Logger, options ...OptionsFunc,
) *Controller

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, setPoint float64) error

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type OptionsFunc

type OptionsFunc func(*Controller)

func ChillerCooldown

func ChillerCooldown(chillerCooldown time.Duration) OptionsFunc

func CyclePeriod

func CyclePeriod(cyclePeriod time.Duration) OptionsFunc

Jump to

Keyboard shortcuts

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