Log tilt readings
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Søren Rasmussen 2022-07-24 08:28:16 +02:00
parent 0b3d35721e
commit 19a79f0e59
2 changed files with 4 additions and 4 deletions

View file

@ -44,6 +44,9 @@ func scan(ctx context.Context, timeout time.Duration) {
metricGravity.WithLabelValues(color).Set(t.Gravity())
metricTemp.WithLabelValues(color).Set(t.Celsius())
// Log tilt readings
t.Print()
select {
case C <- t:
// Message sent

View file

@ -92,8 +92,5 @@ func (t *Tilt) Color() Color {
}
func (t *Tilt) Print() {
log.Printf("Tilt: %v", t.Color())
log.Printf("Fahrenheit: %v\n", t.Fahrenheit())
log.Printf("Specific Gravity: %v\n", t.Gravity())
log.Printf("Celsius: %v\n", t.Celsius())
log.Printf("Tilt: color=%v specific_gravity=%v temp_celcius=%v", t.Color(), t.Gravity(), t.Celsius())
}