kopia lustrzana https://github.com/cyoung/stratux
Only show some debug output depending on globalSettings.DEBUG.
rodzic
009d7219f2
commit
e4d74e221c
|
|
@ -298,7 +298,10 @@ func messageQueueSender() {
|
|||
} else {
|
||||
pd = float64(0.1) // 100ms.
|
||||
}
|
||||
log.Printf("Average sendable queue is %v messages. Changing queue timer to %f seconds\n", averageSendableQueueSize, pd)
|
||||
|
||||
if globalSettings.DEBUG {
|
||||
log.Printf("Average sendable queue is %v messages. Changing queue timer to %f seconds\n", averageSendableQueueSize, pd)
|
||||
}
|
||||
|
||||
queueTimer.Stop()
|
||||
queueTimer = time.NewTicker(time.Duration(pd*1000000000.0) * time.Nanosecond)
|
||||
|
|
|
|||
|
|
@ -977,7 +977,7 @@ func gpsSerialReader() {
|
|||
scanner := bufio.NewScanner(serialPort)
|
||||
for scanner.Scan() && globalStatus.GPS_connected && globalSettings.GPS_Enabled {
|
||||
i++
|
||||
if i%100 == 0 {
|
||||
if globalSettings.DEBUG && i%100 == 0 {
|
||||
log.Printf("gpsSerialReader() scanner loop iteration i=%d\n", i) // debug monitor
|
||||
}
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue