Skip to content
Snippets Groups Projects
Commit 6be36f18 authored by fxk8y's avatar fxk8y :spider:
Browse files

renaming task

parent 9cea0312
Branches feature/ntp
No related tags found
Loading
...@@ -20,7 +20,7 @@ typedef struct { ...@@ -20,7 +20,7 @@ typedef struct {
static ntpd_parameter_t parameter; static ntpd_parameter_t parameter;
void ntpd(void *ignored) { void ntp_task(void *ignored) {
time_t now = 0; time_t now = 0;
struct tm timeinfo = { 0 }; struct tm timeinfo = { 0 };
...@@ -45,7 +45,7 @@ namespace qthing { ...@@ -45,7 +45,7 @@ namespace qthing {
void enable_ntp(std::string address, std::string timezone, qthing::ntp_callback_t callback) { void enable_ntp(std::string address, std::string timezone, qthing::ntp_callback_t callback) {
if (parameter.started) { if (parameter.started) {
ESP_LOGE("NTPD", "service already enabled"); ESP_LOGE("NTP", "service already enabled");
return; return;
} }
...@@ -54,6 +54,6 @@ namespace qthing { ...@@ -54,6 +54,6 @@ namespace qthing {
setenv("TZ", (char *)timezone.c_str(), 1); setenv("TZ", (char *)timezone.c_str(), 1);
tzset(); tzset();
xTaskCreate(ntpd, "ntpd", 10000, NULL, 1, NULL); xTaskCreate(ntp_task, "ntp", 10000, NULL, 1, NULL);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment