From cc96fbccc07f8f4cb99dbe570b8fb00c6a104b77 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Thu, 10 Sep 2026 23:57:46 -0400 Subject: [PATCH] [Issue #10] - Added config option to allow the user to set the hostname --- config.go.example | 1 + network.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.go.example b/config.go.example index 506c3e2..c08f40b 100644 --- a/config.go.example +++ b/config.go.example @@ -6,5 +6,6 @@ const ( WifiPass = "MyWifiPassword" // Network settings + Hostname = "pico2w-clock" EnableICMP = true ) diff --git a/network.go b/network.go index 913e25c..7fbc1af 100644 --- a/network.go +++ b/network.go @@ -112,7 +112,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),