From 8f2478d84f37f7651e61d93bb0d21420528d3e75 Mon Sep 17 00:00:00 2001 From: FOG_Yamato Date: Wed, 5 Apr 2023 23:38:50 +0300 Subject: [PATCH 1/5] Added clock update capability via NTP servers --- html/scan.js | 4 ++++ html/vrx_index.html | 24 ++++++++++++++++++++++++ lib/MSP/msptypes.h | 1 + lib/WIFI/devWIFI.cpp | 18 ++++++++++++++++++ src/Vrx_main.cpp | 6 ++++++ src/hdzero.cpp | 24 ++++++++++++++++++++++++ src/hdzero.h | 1 + src/module_base.cpp | 5 +++++ src/module_base.h | 1 + 9 files changed, 84 insertions(+) diff --git a/html/scan.js b/html/scan.js index 7868c0a..51e589e 100644 --- a/html/scan.js +++ b/html/scan.js @@ -13,6 +13,7 @@ function get_mode() { var data = JSON.parse(this.responseText); if (data.mode==="STA") { _('stamode').style.display = 'block'; + _('rtctab').style.display = 'block'; _('ssid').textContent = data.ssid; } else { _('apmode').style.display = 'block'; @@ -347,6 +348,9 @@ _('forget').addEventListener('click', callback("Forget Home Network", "An error if (_('modelmatch') != undefined) { _('modelmatch').addEventListener('submit', callback("Set Model Match", "An error occurred updating the model match number", "/model", null)); } +_('setrtc').addEventListener('submit', callback("Set RTC Time", "An error occured setting the RTC time", "/setrtc", function() { + return new FormData(_('setrtc')); +})); //========================================================= diff --git a/html/vrx_index.html b/html/vrx_index.html index 74b1b52..12c42d4 100644 --- a/html/vrx_index.html +++ b/html/vrx_index.html @@ -27,6 +27,7 @@

Welcome to your ExpressLRS
update page
@@ -81,6 +82,29 @@

Home Network:

Disconnect
+ +
+
+

RTC Update via NTP

+ Here you can update your goggle RTC clock time using any available NTP server. + Make sure that the home network you're connected to has access to the Internet in order to connect to the NTP server. +
+
+ +
+
+ +
+
+ +
+ +
+
+