Removing debug from numeter for now
This commit is contained in:
parent
86afd312d8
commit
ce08b48821
|
@ -1,7 +1,6 @@
|
||||||
package numeter
|
package numeter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"image"
|
"image"
|
||||||
"image/color"
|
"image/color"
|
||||||
"math"
|
"math"
|
||||||
|
@ -106,16 +105,16 @@ func (v *vuRenderer) Render(w int, h int) image.Image {
|
||||||
val := (v.meter.Value - v.meter.Min) / (v.meter.Max - v.meter.Min) * 100
|
val := (v.meter.Value - v.meter.Min) / (v.meter.Max - v.meter.Min) * 100
|
||||||
vuSet(i, w, h, v.meter.VUMeterDirection, val, g, a, r)
|
vuSet(i, w, h, v.meter.VUMeterDirection, val, g, a, r)
|
||||||
if v.meter.Value > v.lastPeakVal {
|
if v.meter.Value > v.lastPeakVal {
|
||||||
fmt.Printf("New peak: %f, expires at %s\n", v.meter.Value, time.Now().Add(v.meter.Peakhold))
|
//fmt.Printf("New peak: %f, expires at %s\n", v.meter.Value, time.Now().Add(v.meter.Peakhold))
|
||||||
v.lastPeakTime = time.Now()
|
v.lastPeakTime = time.Now()
|
||||||
v.lastPeakVal = v.meter.Value
|
v.lastPeakVal = v.meter.Value
|
||||||
}
|
}
|
||||||
if v.lastPeakTime.Add(v.meter.Peakhold).Before(time.Now()) {
|
if v.lastPeakTime.Add(v.meter.Peakhold).Before(time.Now()) {
|
||||||
fmt.Printf("Previous peak good, bar at %f\n", v.lastPeakVal)
|
//fmt.Printf("Previous peak good, bar at %f\n", v.lastPeakVal)
|
||||||
drawPeakBar(i, w, h, v.meter.VUMeterDirection, v.lastPeakVal, g, a, r)
|
drawPeakBar(i, w, h, v.meter.VUMeterDirection, v.lastPeakVal, g, a, r)
|
||||||
}
|
}
|
||||||
if v.lastPeakTime.Add(v.meter.Peakhold).After(time.Now()) {
|
if v.lastPeakTime.Add(v.meter.Peakhold).After(time.Now()) {
|
||||||
fmt.Printf("Previous peak expired, holding at %f\n", v.meter.Value)
|
//fmt.Printf("Previous peak expired, holding at %f\n", v.meter.Value)
|
||||||
v.lastPeakVal = v.meter.Value
|
v.lastPeakVal = v.meter.Value
|
||||||
v.lastPeakTime = time.Now()
|
v.lastPeakTime = time.Now()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue