[Issue #10] - Added config option to allow the user to set the hostname
This commit is contained in:
@@ -6,5 +6,6 @@ const (
|
|||||||
WifiPass = "MyWifiPassword"
|
WifiPass = "MyWifiPassword"
|
||||||
|
|
||||||
// Network settings
|
// Network settings
|
||||||
|
Hostname = "pico2w-clock"
|
||||||
EnableICMP = true
|
EnableICMP = true
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -112,7 +112,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