From c60ef1c093433f798f0b304ff841a99bc94c0ec5 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Mon, 7 Sep 2026 00:34:29 -0400 Subject: [PATCH] [Issue #1] - Adding UpdateInterval config value to set how long to wait in between each update loop, in seconds --- config.go.example | 6 ++++++ main.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.go.example b/config.go.example index 54514f8..9e130e8 100644 --- a/config.go.example +++ b/config.go.example @@ -1,5 +1,9 @@ package main +import ( + "time" +) + const ( WifiSSID = "My Wifi Name" WifiPass = "SecretWifiPassword" @@ -12,4 +16,6 @@ const ( NodeName = "Studio Weather" NodeID = "studio_env" ClientID = "pico2w_studio_env" + + UpdateInterval = 30 * time.Second ) diff --git a/main.go b/main.go index 321081c..89f3c96 100644 --- a/main.go +++ b/main.go @@ -346,6 +346,6 @@ func main() { } } - time.Sleep(30 * time.Second) + time.Sleep(UpdateInterval) } }