Skip to content

Commit

Permalink
phc2phc use defaultmaxfreq (facebook#422)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#422

WHAT?

Fixes potential issue with pi servo frequency not being set when there is a failure getting it from the device

WHY?
🔨

Considerations:

 - How was this caugh?
   - Found during ts2phc rewrite, this looked funky. ts2phc separates this into function, and upon testing that function this was found.

Reviewed By: abulimov

Differential Revision: D63701624

fbshipit-source-id: 2c1173f67f3d2b02f17252fb9e26b895c042264b
  • Loading branch information
crmdias authored and facebook-github-bot committed Nov 13, 2024
1 parent 05732e9 commit a92d130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ptpcheck/cmd/phc2phc.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ func phc2phcRun(srcDevice string, dstDevice string, interval time.Duration, step
if err != nil {
log.Warningf("max PHC frequency error: %v", err)
maxFreq = phc.DefaultMaxClockFreqPPB
} else {
pi.SetMaxFreq(maxFreq)
}
pi.SetMaxFreq(maxFreq)

log.Debugf("max PHC frequency: %v", maxFreq)

for ; ; time.Sleep(interval) {
Expand Down

0 comments on commit a92d130

Please sign in to comment.