Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BFW-5926] Enable DNS for sntp and set default to prusa3d.pool.ntp.org #3730

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions lib/WUI/sntp/sntp_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
3 changes: 2 additions & 1 deletion lib/WUI/sntp/sntp_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down