pull/11/head
Christopher Young 2015-08-20 12:54:46 -04:00
rodzic cfd8b9fcaf
commit 1ba6f744ea
2 zmienionych plików z 12 dodań i 15 usunięć

Wyświetl plik

@ -17,7 +17,6 @@ import (
const ( const (
stratuxVersion = "v0.1" stratuxVersion = "v0.1"
configLocation = "/etc/stratux.conf" configLocation = "/etc/stratux.conf"
ipadAddr = "192.168.10.255:4000" // Port 4000 for FreeFlight RANGR.
managementAddr = "127.0.0.1:9110" managementAddr = "127.0.0.1:9110"
maxDatagramSize = 8192 maxDatagramSize = 8192
UPLINK_BLOCK_DATA_BITS = 576 UPLINK_BLOCK_DATA_BITS = 576
@ -361,7 +360,6 @@ type settings struct {
ES_Enabled bool ES_Enabled bool
GPS_Enabled bool GPS_Enabled bool
GDLOutputPorts []uint16 GDLOutputPorts []uint16
} }
type status struct { type status struct {

Wyświetl plik

@ -1,19 +1,18 @@
package main package main
import ( import (
"log"
"time"
"io/ioutil" "io/ioutil"
"strings" "log"
"strconv"
"net" "net"
"strconv"
"strings"
"time"
) )
var messageQueue chan []byte var messageQueue chan []byte
var outSockets map[string]*net.UDPConn var outSockets map[string]*net.UDPConn
var dhcpLeases map[string]string var dhcpLeases map[string]string
// Read the "dhcpd.leases" file and parse out IP/hostname. // Read the "dhcpd.leases" file and parse out IP/hostname.
func getDHCPLeases() (map[string]string, error) { func getDHCPLeases() (map[string]string, error) {
dat, err := ioutil.ReadFile("/var/lib/dhcp/dhcpd.leases") dat, err := ioutil.ReadFile("/var/lib/dhcp/dhcpd.leases")