put back Devices assignment, change type for atomic store

pull/101/head
Joseph Poirier 2015-11-06 21:57:59 -06:00
rodzic cb1dbcf92f
commit 88ec861fb7
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -455,7 +455,7 @@ func cpuTempMonitor() {
globalStatus.CPUTemp = float32(tInt) // case where Temp is returned as simple integer
}
}
}
}
}
}
@ -708,7 +708,7 @@ type settings struct {
type status struct {
Version string
Devices uint
Devices uint32
Connected_Users uint
UAT_messages_last_minute uint
uat_products_last_minute map[string]uint32

Wyświetl plik

@ -6,6 +6,7 @@ import (
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"../godump978"
@ -228,6 +229,7 @@ func sdrWatcher() {
for {
time.Sleep(1 * time.Second)
count := rtl.GetDeviceCount()
atomic.StoreUint32(&globalStatus.Devices, uint32(count))
log.Println("DeviceCount...", count)
// support two and only two dongles