Clean up log output.

pull/678/head
cyoung 2017-10-12 13:21:55 -04:00
rodzic 8bc7f0c093
commit 9a3fe7c0d1
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -1237,13 +1237,13 @@ func printStats() {
}
sensorsOutput := make([]string, 0)
if globalSettings.IMU_Sensor_Enabled {
sensorsOutput = append(sensorsOutput, fmt.Sprintf("Last IMU read: %s\n", stratuxClock.HumanizeTime(mySituation.AHRSLastAttitudeTime)))
sensorsOutput = append(sensorsOutput, fmt.Sprintf("Last IMU read: %s", stratuxClock.HumanizeTime(mySituation.AHRSLastAttitudeTime)))
}
if globalSettings.BMP_Sensor_Enabled {
sensorsOutput = append(sensorsOutput, fmt.Sprintf(" - Last BMP read: %s\n", stratuxClock.HumanizeTime(mySituation.BaroLastMeasurementTime)))
sensorsOutput = append(sensorsOutput, fmt.Sprintf("Last BMP read: %s", stratuxClock.HumanizeTime(mySituation.BaroLastMeasurementTime)))
}
if len(sensorsOutput) > 0 {
log.Printf("- " + strings.Join(sensorsOutput, ", "))
log.Printf("- " + strings.Join(sensorsOutput, ", ") + "\n")
}
// Check if we're using more than 95% of the free space. If so, throw a warning (only once).
if !diskUsageWarning && usage.Usage() > 0.95 {