kopia lustrzana https://github.com/cyoung/stratux
PPM settings.
rodzic
f0e0f44e68
commit
5f64bd39fd
|
@ -502,6 +502,7 @@ type settings struct {
|
||||||
AHRS_Enabled bool
|
AHRS_Enabled bool
|
||||||
DEBUG bool
|
DEBUG bool
|
||||||
ReplayLog bool // Startup only option. Cannot be changed during runtime.
|
ReplayLog bool // Startup only option. Cannot be changed during runtime.
|
||||||
|
PPM uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
type status struct {
|
type status struct {
|
||||||
|
@ -617,7 +618,6 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
initRY835AI()
|
initRY835AI()
|
||||||
|
|
||||||
//TODO: network stuff
|
//TODO: network stuff
|
||||||
|
|
|
@ -100,14 +100,13 @@ func sdrReader() {
|
||||||
log.Printf("\tResetBuffer Failed - error: %s\n", err)
|
log.Printf("\tResetBuffer Failed - error: %s\n", err)
|
||||||
}
|
}
|
||||||
//---------- Get/Set Freq Correction ----------
|
//---------- Get/Set Freq Correction ----------
|
||||||
myPPM := 0
|
|
||||||
freqCorr := dev.GetFreqCorrection()
|
freqCorr := dev.GetFreqCorrection()
|
||||||
log.Printf("\tGetFreqCorrection: %d\n", freqCorr)
|
log.Printf("\tGetFreqCorrection: %d\n", freqCorr)
|
||||||
err = dev.SetFreqCorrection(myPPM)
|
err = dev.SetFreqCorrection(globalSettings.PPM)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("\tSetFreqCorrection %d Failed, error: %s\n", myPPM, err)
|
log.Printf("\tSetFreqCorrection %d Failed, error: %s\n", globalSettings.PPM, err)
|
||||||
} else {
|
} else {
|
||||||
log.Printf("\tSetFreqCorrection %d Successful\n", myPPM)
|
log.Printf("\tSetFreqCorrection %d Successful\n", globalSettings.PPM)
|
||||||
}
|
}
|
||||||
|
|
||||||
for uatSDR != -1 {
|
for uatSDR != -1 {
|
||||||
|
|
Ładowanie…
Reference in New Issue