th7/data/config/data.go

33 lines
724 B
Go
Raw Normal View History

2022-11-12 14:20:29 +00:00
package config
import (
"th7/data/thermocouple"
)
2023-11-21 14:45:14 +00:00
type Filter struct {
2023-11-21 14:57:53 +00:00
SampleSize int `json:"sample_size"`
2023-11-21 14:45:14 +00:00
}
2022-11-12 14:20:29 +00:00
type Channel struct {
Id int `json:"id"`
Thermo thermocouple.Type `json:"thermocouple"`
Gain float64 `json:"gain"`
Offset float64 `json:"offset"`
2023-11-21 14:57:53 +00:00
Filter Filter `json:"filter"`
2022-11-12 14:20:29 +00:00
}
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"`
2022-11-12 14:20:29 +00:00
}
type Config struct {
Board TH7 `json:"TH7"`
Channels []Channel `json:"channels"`
DB map[string]interface{} `json:"db"`
}