Reduce UDP output to max 1x per second

This commit is contained in:
Sjef Verhoeven PE5PVB
2025-02-10 16:05:48 +01:00
parent 042c968111
commit 2f5c959606

View File

@@ -446,6 +446,7 @@ unsigned long scantimer;
unsigned long signalstatustimer; unsigned long signalstatustimer;
unsigned long tottimer; unsigned long tottimer;
unsigned long tuningtimer; unsigned long tuningtimer;
unsigned long udplogtimer;
unsigned long udptimer; unsigned long udptimer;
mem presets[EE_PRESETS_CNT]; mem presets[EE_PRESETS_CNT];
@@ -955,7 +956,11 @@ void setup() {
void loop() { void loop() {
if (wifi && !menu) { if (wifi && !menu) {
webserver.handleClient(); webserver.handleClient();
sendUDPlog();
if (millis() >= udplogtimer + 1000) {
sendUDPlog();
udplogtimer = millis();
}
if (millis() >= NTPtimer + 1800000) { if (millis() >= NTPtimer + 1800000) {
NTPupdate(); NTPupdate();