[Issue #7] - Added config.go setting to allow setting the hostname
This commit is contained in:
@@ -9,6 +9,7 @@ const (
|
||||
WifiPass = "SecretWifiPassword"
|
||||
|
||||
// Networking settings
|
||||
Hostname = "pico2w-bme280"
|
||||
EnableICMP = true
|
||||
|
||||
MQTTHost = "192.168.1.50" // Must be an IP address; DNS resolution is not supported currently
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ func InitNetwork(ssid, pass string) (*NetworkStack, error) {
|
||||
|
||||
stack := &xnet.StackAsync{}
|
||||
err = stack.Reset(xnet.StackConfig{
|
||||
Hostname: "pico2w-bme280",
|
||||
Hostname: Hostname,
|
||||
RandSeed: time.Now().UnixNano(),
|
||||
MaxActiveTCPPorts: 2,
|
||||
MTU: uint16(framelen - ethernet.MaxOverheadSize),
|
||||
|
||||
Reference in New Issue
Block a user