kopia lustrzana https://github.com/cyoung/stratux
remove small hack for freq correction; gortlsdr has been modified to handle -2 error from librtlsdr when requested ppm is the same as current ppm"
rodzic
76408d5828
commit
cb2b1acccc
|
@ -181,10 +181,6 @@ func (u *UAT) sdrConfig() (err error) {
|
||||||
//---------- Get/Set Freq Correction ----------
|
//---------- Get/Set Freq Correction ----------
|
||||||
freqCorr := u.dev.GetFreqCorrection()
|
freqCorr := u.dev.GetFreqCorrection()
|
||||||
log.Printf("\tGetFreqCorrection: %d\n", freqCorr)
|
log.Printf("\tGetFreqCorrection: %d\n", freqCorr)
|
||||||
// avoid librtlsdr error code inconsistency, i.e.
|
|
||||||
// error code -2 means the stored value is the same as
|
|
||||||
// the PPM value we sent (dev->corr == PPM)
|
|
||||||
if freqCorr != globalSettings.PPM {
|
|
||||||
err = u.dev.SetFreqCorrection(globalSettings.PPM)
|
err = u.dev.SetFreqCorrection(globalSettings.PPM)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// just a warning
|
// just a warning
|
||||||
|
@ -192,7 +188,6 @@ func (u *UAT) sdrConfig() (err error) {
|
||||||
} else {
|
} else {
|
||||||
log.Printf("\tSetFreqCorrection %d Successful\n", globalSettings.PPM)
|
log.Printf("\tSetFreqCorrection %d Successful\n", globalSettings.PPM)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue