From 7bc3ce328d61c1afe138802ded812d718b056257 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 20 Dec 2025 13:05:09 +0100 Subject: Reduce polling period to 50 ms The human reaction time is roughly 100 ms. The Nyquist-Shannon sampling theorem [1] is used for an approximation how often it is required to sample without humans noticing any delays. [1]: https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 051deef..6f1695d 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ const ( RETAINED = false MQTT_CONNECT_TIMEOUT = time.Second * 5 MQTT_DISCONNECT_TIMEOUT_US = 500 - POLLING_PERIOD = 500 * time.Millisecond + POLLING_PERIOD = 50 * time.Millisecond ) func main() { -- cgit v1.2.3-70-g09d2