33 lines
724 B
Go
33 lines
724 B
Go
package config
|
|
|
|
import (
|
|
"th7/data/thermocouple"
|
|
)
|
|
|
|
type Filter struct {
|
|
SampleSize int `json:"sample_size"`
|
|
}
|
|
|
|
type Channel struct {
|
|
Id int `json:"id"`
|
|
Thermo thermocouple.Type `json:"thermocouple"`
|
|
Gain float64 `json:"gain"`
|
|
Offset float64 `json:"offset"`
|
|
Filter Filter `json:"filter"`
|
|
}
|
|
|
|
type TH7 struct {
|
|
Port int `json:"port"`
|
|
Cache bool `json:"cache"`
|
|
Led bool `json:"LED"`
|
|
Logfreq int `json:"logfreq"`
|
|
Debug bool `json:"debug"`
|
|
NoLogging bool `json:"nologging"`
|
|
}
|
|
|
|
type Config struct {
|
|
Board TH7 `json:"TH7"`
|
|
Channels []Channel `json:"channels"`
|
|
DB map[string]interface{} `json:"db"`
|
|
}
|