refac(pkg/sensor): temperature measurement unit
This commit is contained in:
@ -16,12 +16,13 @@ import (
|
||||
)
|
||||
|
||||
// Start the daemon
|
||||
func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compression bool, round float64, logger logger.Logger) {
|
||||
func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compression bool, degree types.TemperatureUnit, round float64, logger logger.Logger) {
|
||||
|
||||
// Info
|
||||
logger.Info("Use clean-cache-interval: %v", cleanCacheInterval.String())
|
||||
logger.Info("Use compression: %v", compression)
|
||||
logger.Info("Round values: %v", round)
|
||||
logger.Info("Temperature unit: %v", degree)
|
||||
|
||||
temperatureLogfile := logfile.New(cnf.Device.TemperatureLogfile)
|
||||
|
||||
@ -38,7 +39,7 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
|
||||
childContext, cancel := context.WithCancel(ctx)
|
||||
|
||||
// go sensor.ReadHumiditiesContinuously(cnf.GetHumiditySensors(config.ENABLED), humidityChannel, errorChannel)
|
||||
go sensor.ReadTemperaturesContinuously(childContext, cnf.GetTemperatureSensors(config.ENABLED), types.DegreeCelsius, round, temperatureChannel, errorChannel)
|
||||
go sensor.ReadTemperaturesContinuously(childContext, cnf.GetTemperatureSensors(config.ENABLED), degree, round, temperatureChannel, errorChannel)
|
||||
|
||||
temperatureCache := make([]*types.Temperature, 0)
|
||||
|
||||
|
Reference in New Issue
Block a user