From 30a847a563a4f8f39f11d98bca78a36f25721410 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Fri, 2 Aug 2024 21:48:35 -0400 Subject: [PATCH] Add option to configure NTP server --- main/config.h | 2 +- main/htmls/html_pages.h | 33 +++++++++++++++++++-------------- main/language_translations.h | 1 + main/languages/ca-ES.h | 3 ++- main/languages/da-DA.h | 3 ++- main/languages/de-DE.h | 1 + main/languages/en-GB.h | 3 ++- main/languages/es-ES.h | 3 ++- main/languages/fr-FR.h | 7 ++++--- main/languages/it-IT.h | 7 ++++--- main/languages/ja-JP.h | 7 ++++--- main/languages/vi-VN.h | 3 ++- main/languages/zh-CN.h | 7 ++++--- main/main.cpp | 17 ++++++++++++----- 14 files changed, 60 insertions(+), 37 deletions(-) diff --git a/main/config.h b/main/config.h index 6bb84e5..a4d08c0 100644 --- a/main/config.h +++ b/main/config.h @@ -194,7 +194,7 @@ String ap_pwd; String ota_pwd; // time and time zone -const char *ntpServer = "pool.ntp.org"; +String ntpServer = "pool.ntp.org"; const long gmtOffset_sec = 3600; const int daylightOffset_sec = 3600; diff --git a/main/htmls/html_pages.h b/main/htmls/html_pages.h index af250e8..8563775 100644 --- a/main/htmls/html_pages.h +++ b/main/htmls/html_pages.h @@ -13,8 +13,8 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -const char html_page_reboot[] PROGMEM = + +const char html_page_reboot[] PROGMEM = "

_TXT_M_REBOOT_ 20s...

" ""; -const char html_page_reset[] PROGMEM = +const char html_page_reset[] PROGMEM = "

_TXT_M_RESET_ 20s. _TXT_M_RESET_1_ _UNIT_NAME_

" ; -const char html_page_save_reboot[] PROGMEM = +const char html_page_save_reboot[] PROGMEM = "

_TXT_M_SAVE_ 20s...

" "" ; -const char html_page_mqtt[] PROGMEM = +const char html_page_mqtt[] PROGMEM = "
" "
" "  _TXT_MQTT_TITLE_  " @@ -90,7 +90,7 @@ const char html_page_mqtt[] PROGMEM = "
" ; -const char html_page_others[] PROGMEM = +const char html_page_others[] PROGMEM = "
" "
" "  _TXT_OTHERS_TITLE_  " @@ -131,6 +131,11 @@ const char html_page_others[] PROGMEM = "" "

" + "

_TXT_OTHER_NTP_SERVER_" + "
" + "" + "

" "
" "" "" @@ -143,7 +148,7 @@ const char html_page_others[] PROGMEM = "
" ; -const char html_page_status[] PROGMEM = +const char html_page_status[] PROGMEM = "
" "
" "  _TXT_STATUS_TITLE_  " @@ -168,7 +173,7 @@ const char html_page_status[] PROGMEM = "

" "
"; -const char html_page_wifi[] PROGMEM = +const char html_page_wifi[] PROGMEM = "
" "
" "  _TXT_WIFI_TITLE_  " @@ -211,7 +216,7 @@ const char html_page_wifi[] PROGMEM = "
" ; -const char html_page_control[] PROGMEM = +const char html_page_control[] PROGMEM = "
" "

_TXT_CTRL_CTEMP_ _ROOMTEMP_°

" @@ -307,7 +312,7 @@ const char html_page_control[] PROGMEM = "

" "
"; -const char html_page_unit[] PROGMEM = +const char html_page_unit[] PROGMEM = "
" "
" "  _TXT_UNIT_TITLE_  " @@ -355,7 +360,7 @@ const char html_page_unit[] PROGMEM = "" "

" - "
" + "
" "

_TXT_UNIT_LOGIN_USERNAME_ admin

" "
" "" @@ -370,7 +375,7 @@ const char html_page_unit[] PROGMEM = "
" ; -const char html_page_login[] PROGMEM = +const char html_page_login[] PROGMEM = "