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