Skip to content

Commit

Permalink
remove debug messages
Browse files Browse the repository at this point in the history
Summary: me_debugging_with_print

Reviewed By: leoleovich, t3lurid3

Differential Revision: D53105970

fbshipit-source-id: 8cb9bb40f4319b431ef7656c9e3257999fc3b1e9
  • Loading branch information
vvfedorenko authored and facebook-github-bot committed Jan 26, 2024
1 parent 557f84f commit 116135c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions servo/pi.go
Expand Up @@ -348,15 +348,12 @@ func (f *PiServoFilter) Sample(s *PiServoFilterSample) {
f.freqSamples.Value = s
f.freqSamples = f.freqSamples.Next()
f.freqMean += s.freq / float64(f.freqSamplesCount)
log.Infof("Filter.Sample: ring is full, new freq %0.3f, new freq mean %0.3f", s.freq, f.freqMean)
} else {
// the ring wasn't full yet
log.Infof("Filter.Sample: ring is not full, new freq %0.3f, samples count %d", s.freq, f.freqSamplesCount)
f.freqSamples.Value = s
f.freqSamples = f.freqSamples.Next()
f.freqSamplesCount++
if f.freqSamples.Value != nil {
log.Infof("Filter.Sample: ring is full NOW, new freq %0.3f, samples count %d", s.freq, f.freqSamplesCount)
// we have to calculate mean frequency here for the first time
f.freqMean = float64(0)
f.freqSamples.Do(func(val any) {
Expand All @@ -366,7 +363,6 @@ func (f *PiServoFilter) Sample(s *PiServoFilterSample) {
v := val.(*PiServoFilterSample)
f.freqMean += v.freq / float64(f.freqSamplesCount)
})
log.Infof("Filter.Sample: ring is full NOW, mean freq %0.3f, samples count %d", f.freqMean, f.freqSamplesCount)
}
}
f.freqSamples.Do(func(val any) {
Expand Down

0 comments on commit 116135c

Please sign in to comment.