From 85d44182b08e9c85d9c29695497a6da0782bd7c9 Mon Sep 17 00:00:00 2001 From: Ted Hess Date: Wed, 7 Feb 2024 13:53:57 -0500 Subject: [PATCH] Enable DNS for sntp and set default to prusa3d.pool.ntp.org Ref: https://www.ntppool.org/ --- lib/WUI/sntp/sntp_client.c | 7 ------- lib/WUI/sntp/sntp_opts.h | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/WUI/sntp/sntp_client.c b/lib/WUI/sntp/sntp_client.c index 9307b769aa..b7f34d9697 100644 --- a/lib/WUI/sntp/sntp_client.c +++ b/lib/WUI/sntp/sntp_client.c @@ -3,17 +3,10 @@ #include "netdev.h" #include "tcpip.h" -static ip_addr_t ntp_server; // testing ntp server located in Prague static uint32_t sntp_running = 0; // describes if sntp is currently running or not void sntp_client_init(void) { sntp_setoperatingmode(SNTP_OPMODE_POLL); - /* TODO: enable DNS for ntp.pool.org as default sntp server*/ - - // TMP: ip of Czech CESNET NTP server tak.cesnet.cz - if (ipaddr_aton("195.113.144.238", &ntp_server)) { - sntp_setserver(0, &ntp_server); - } sntp_init(); } diff --git a/lib/WUI/sntp/sntp_opts.h b/lib/WUI/sntp/sntp_opts.h index 74e582f33f..2217b30276 100644 --- a/lib/WUI/sntp/sntp_opts.h +++ b/lib/WUI/sntp/sntp_opts.h @@ -78,7 +78,8 @@ * \#define SNTP_SERVER_ADDRESS "pool.ntp.org" */ #if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ - #define SNTP_SERVER_DNS 0 + #define SNTP_SERVER_DNS 1 + #define SNTP_SERVER_ADDRESS "prusa3d.pool.ntp.org" #endif /**