kopia lustrzana https://github.com/cyoung/stratux
Merge branch 'master' into ahrs_dev_protocolfun
# Conflicts: # selfupdate/makeupdate.sh # selfupdate/update_footer.shadsbexchange
rodzic
157e456805
commit
022545dde6
|
@ -3,4 +3,4 @@
|
|||
url = https://github.com/AvSquirrel/dump1090
|
||||
[submodule "goflying"]
|
||||
path = goflying
|
||||
url = https://github.com/westphae/goflying
|
||||
url = https://github.com/cyoung/goflying
|
||||
|
|
|
@ -19,8 +19,6 @@ and often times reading this file hangs quite some time. */
|
|||
func cpuTempMonitor(updater CpuTempUpdateFunc) {
|
||||
timer := time.NewTicker(1 * time.Second)
|
||||
for {
|
||||
<-timer.C
|
||||
|
||||
// Update CPUTemp.
|
||||
temp, err := ioutil.ReadFile("/sys/class/thermal/thermal_zone0/temp")
|
||||
tempStr := strings.Trim(string(temp), "\n")
|
||||
|
@ -38,7 +36,7 @@ func cpuTempMonitor(updater CpuTempUpdateFunc) {
|
|||
if t >= invalidCpuTemp { // Only update if valid value was obtained.
|
||||
updater(t)
|
||||
}
|
||||
|
||||
<-timer.C
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1092,7 +1092,6 @@ type status struct {
|
|||
Uptime int64
|
||||
UptimeClock time.Time
|
||||
CPUTemp float32
|
||||
CPULoad string
|
||||
NetworkDataMessagesSent uint64
|
||||
NetworkDataMessagesSentNonqueueable uint64
|
||||
NetworkDataBytesSent uint64
|
||||
|
@ -1230,18 +1229,21 @@ func printStats() {
|
|||
log.Printf("stats [started: %s]\n", humanize.RelTime(time.Time{}, stratuxClock.Time, "ago", "from now"))
|
||||
log.Printf(" - Disk bytes used = %s (%.1f %%), Disk bytes free = %s (%.1f %%)\n", humanize.Bytes(usage.Used()), 100*usage.Usage(), humanize.Bytes(usage.Free()), 100*(1-usage.Usage()))
|
||||
log.Printf(" - CPUTemp=%.02f deg C, MemStats.Alloc=%s, MemStats.Sys=%s, totalNetworkMessagesSent=%s\n", globalStatus.CPUTemp, humanize.Bytes(uint64(memstats.Alloc)), humanize.Bytes(uint64(memstats.Sys)), humanize.Comma(int64(totalNetworkMessagesSent)))
|
||||
log.Printf(" - CPU load %s\n", globalStatus.CPULoad)
|
||||
log.Printf(" - UAT/min %s/%s [maxSS=%.02f%%], ES/min %s/%s, Total traffic targets tracked=%s", humanize.Comma(int64(globalStatus.UAT_messages_last_minute)), humanize.Comma(int64(globalStatus.UAT_messages_max)), float64(maxSignalStrength)/10.0, humanize.Comma(int64(globalStatus.ES_messages_last_minute)), humanize.Comma(int64(globalStatus.ES_messages_max)), humanize.Comma(int64(len(seenTraffic))))
|
||||
log.Printf(" - Network data messages sent: %d total, %d nonqueueable. Network data bytes sent: %d total, %d nonqueueable.\n", globalStatus.NetworkDataMessagesSent, globalStatus.NetworkDataMessagesSentNonqueueable, globalStatus.NetworkDataBytesSent, globalStatus.NetworkDataBytesSentNonqueueable)
|
||||
if globalSettings.GPS_Enabled {
|
||||
log.Printf(" - Last GPS fix: %s, GPS solution type: %d using %d satellites (%d/%d seen/tracked), NACp: %d, est accuracy %.02f m\n", stratuxClock.HumanizeTime(mySituation.GPSLastFixLocalTime), mySituation.GPSFixQuality, mySituation.GPSSatellites, mySituation.GPSSatellitesSeen, mySituation.GPSSatellitesTracked, mySituation.GPSNACp, mySituation.GPSHorizontalAccuracy)
|
||||
log.Printf(" - GPS vertical velocity: %.02f ft/sec; GPS vertical accuracy: %v m\n", mySituation.GPSVerticalSpeed, mySituation.GPSVerticalAccuracy)
|
||||
}
|
||||
sensorsOutput := make([]string, 0)
|
||||
if globalSettings.IMU_Sensor_Enabled {
|
||||
log.Printf(" - Last IMU read: %s\n", stratuxClock.HumanizeTime(mySituation.AHRSLastAttitudeTime))
|
||||
sensorsOutput = append(sensorsOutput, fmt.Sprintf("Last IMU read: %s\n", stratuxClock.HumanizeTime(mySituation.AHRSLastAttitudeTime)))
|
||||
}
|
||||
if globalSettings.BMP_Sensor_Enabled {
|
||||
log.Printf(" - Last BMP read: %s\n", stratuxClock.HumanizeTime(mySituation.BaroLastMeasurementTime))
|
||||
sensorsOutput = append(sensorsOutput, fmt.Sprintf(" - Last BMP read: %s\n", stratuxClock.HumanizeTime(mySituation.BaroLastMeasurementTime)))
|
||||
}
|
||||
if len(sensorsOutput) > 0 {
|
||||
log.Printf("- " + strings.Join(sensorsOutput, ", "))
|
||||
}
|
||||
// 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 {
|
||||
|
|
|
@ -117,7 +117,6 @@ Stratux makes available a webserver to retrieve statistics which may be useful t
|
|||
"Uptime": 323020,
|
||||
"UptimeClock": "0001-01-01T00:05:23.02Z",
|
||||
"CPUTemp": 47.774,
|
||||
"CPULoad": "",
|
||||
"NetworkDataMessagesSent": 0,
|
||||
"NetworkDataMessagesSentNonqueueable": 0,
|
||||
"NetworkDataBytesSent": 0,
|
||||
|
|
|
@ -39,9 +39,12 @@ cp image/stratux-wifi.sh work/bin/
|
|||
cp image/rc.local work/bin/
|
||||
cp image/dhcpd.conf work/bin/
|
||||
cp image/interfaces work/bin/
|
||||
<<<<<<< HEAD
|
||||
cp test-data/ahrs/ahrs_table.log work/bin/
|
||||
cp ahrs_approx work/bin/
|
||||
|
||||
=======
|
||||
>>>>>>> master
|
||||
|
||||
#TODO: librtlsdr.
|
||||
cd work/
|
||||
|
|
|
@ -70,11 +70,14 @@ chmod 755 /usr/bin/fancontrol
|
|||
|
||||
cp -f dump1090 /usr/bin/
|
||||
|
||||
<<<<<<< HEAD
|
||||
# AHRS approx data.
|
||||
cp -f ahrs_table.log /root/
|
||||
cp -f ahrs_approx /usr/bin/
|
||||
chmod 755 /usr/bin/ahrs_approx
|
||||
|
||||
=======
|
||||
>>>>>>> master
|
||||
# DHCPD Config.
|
||||
cp -f dhcpd.conf /etc/dhcp/dhcpd.conf
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
rm -rf /root/stratux-update
|
||||
mkdir -p /root/stratux-update
|
||||
cd /root/stratux-update
|
||||
mv -f /var/log/stratux.sqlite /var/log/stratux.sqlite.`date +%s`
|
||||
rm -f /var/log/stratux.sqlite-wal /var/log/stratux.sqlite-shm
|
||||
rm -f /var/log/stratux.sqlite /var/log/stratux.sqlite-wal /var/log/stratux.sqlite-shm
|
||||
rm -f /var/log/stratux.log
|
||||
|
|
|
@ -110,7 +110,6 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) {
|
|||
$scope.UAT_PIREP_total = status.UAT_PIREP_total;
|
||||
$scope.UAT_NOTAM_total = status.UAT_NOTAM_total;
|
||||
$scope.UAT_OTHER_total = status.UAT_OTHER_total;
|
||||
$scope.CPULoad = status.CPULoad;
|
||||
// Errors array.
|
||||
if (status.Errors.length > 0) {
|
||||
$scope.visible_errors = true;
|
||||
|
|
Ładowanie…
Reference in New Issue