This commit is contained in:
parent
0b3d35721e
commit
19a79f0e59
2 changed files with 4 additions and 4 deletions
|
@ -44,6 +44,9 @@ func scan(ctx context.Context, timeout time.Duration) {
|
||||||
metricGravity.WithLabelValues(color).Set(t.Gravity())
|
metricGravity.WithLabelValues(color).Set(t.Gravity())
|
||||||
metricTemp.WithLabelValues(color).Set(t.Celsius())
|
metricTemp.WithLabelValues(color).Set(t.Celsius())
|
||||||
|
|
||||||
|
// Log tilt readings
|
||||||
|
t.Print()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case C <- t:
|
case C <- t:
|
||||||
// Message sent
|
// Message sent
|
||||||
|
|
|
@ -92,8 +92,5 @@ func (t *Tilt) Color() Color {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Tilt) Print() {
|
func (t *Tilt) Print() {
|
||||||
log.Printf("Tilt: %v", t.Color())
|
log.Printf("Tilt: color=%v specific_gravity=%v temp_celcius=%v", t.Color(), t.Gravity(), t.Celsius())
|
||||||
log.Printf("Fahrenheit: %v\n", t.Fahrenheit())
|
|
||||||
log.Printf("Specific Gravity: %v\n", t.Gravity())
|
|
||||||
log.Printf("Celsius: %v\n", t.Celsius())
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue