kopia lustrzana https://github.com/cyoung/stratux
Calculate Nav rate less frequently to reduce CPU usage.
rodzic
1326450eb3
commit
30d08af300
14
main/gps.go
14
main/gps.go
|
@ -1054,10 +1054,6 @@ func processNMEALine(l string) (sentenceUsed bool) {
|
|||
mySituation.muGPSPerformance.Unlock()
|
||||
}
|
||||
|
||||
if globalSettings.IMU_Sensor_Enabled && globalStatus.IMUConnected {
|
||||
calculateNavRate()
|
||||
}
|
||||
|
||||
return true
|
||||
} else if x[1] == "03" { // satellite status message. Only the first 20 satellites will be reported in this message for UBX firmware older than v3.0. Order seems to be GPS, then SBAS, then GLONASS.
|
||||
|
||||
|
@ -1392,10 +1388,6 @@ func processNMEALine(l string) (sentenceUsed bool) {
|
|||
mySituation.muGPSPerformance.Unlock()
|
||||
}
|
||||
|
||||
if globalSettings.IMU_Sensor_Enabled && globalStatus.IMUConnected {
|
||||
calculateNavRate()
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
} else if (x[0] == "GNRMC") || (x[0] == "GPRMC") { // Recommended Minimum data.
|
||||
|
@ -1544,10 +1536,6 @@ func processNMEALine(l string) (sentenceUsed bool) {
|
|||
mySituation.muGPSPerformance.Unlock()
|
||||
}
|
||||
|
||||
if globalSettings.IMU_Sensor_Enabled && globalStatus.IMUConnected {
|
||||
calculateNavRate()
|
||||
}
|
||||
|
||||
setDataLogTimeWithGPS(mySituation)
|
||||
return true
|
||||
|
||||
|
@ -1930,6 +1918,8 @@ func gpsAttitudeSender() {
|
|||
<-timer.C
|
||||
if !(globalStatus.GPS_connected || globalStatus.IMUConnected) {
|
||||
myGPSPerfStats = make([]gpsPerfStats, 0) // reinitialize statistics on disconnect / reconnect
|
||||
} else {
|
||||
calculateNavRate()
|
||||
}
|
||||
|
||||
for !(globalSettings.IMU_Sensor_Enabled && globalStatus.IMUConnected) && (globalSettings.GPS_Enabled && globalStatus.GPS_connected) {
|
||||
|
|
Ładowanie…
Reference in New Issue