fermentord/internal/controllers/config.go
2021-11-17 22:30:18 +01:00

25 lines
870 B
Go

package controllers
type ControllerConfig struct {
Sensor struct {
Wort string `mapstructure:"wort"`
Chamber string `mapstructure:"chamber"`
Ambient string `mapstructure:"ambient"`
} `mapstructure:"sensors"`
FermentationTemperature float64 `mapstructure:"fermentation_temp"`
DeltaTemperature float64 `mapstructure:"delta_temp"`
Limits struct {
MinChamberTemperature float64 `mapstructure:"min_chamber_temp"`
MinCoolerRuntimeSecs float64 `mapstructure:"min_cooler_runtime_secs"` // 900
MaxCoolerRuntimeSecs float64 `mapstructure:"max_cooler_runtime_secs"` // 86400
MinCoolerCooldownSecs float64 `mapstructure:"min_cooler_cooldown_secs"` // 900
} `mapstructure:"limits"`
PID struct {
Kp float64 `mapstructure:"kp"` // 2.0
Ki float64 `mapstructure:"ki"` // 0.0001
Kd float64 `mapstructure:"kd"` // 2.0
} `mapstructure:"pid"`
}