ExpressLRS / Backpack

Firmware for ExpressLRS compatible backpacks
GNU General Public License v3.0
101 stars 73 forks source link

Clock update via NTP & Platform update #86

Closed FOG-Yamato closed 1 year ago

FOG-Yamato commented 1 year ago

As the HDZero goggles got support for a RTC clock I decided to add the capability of updating said RTC clock via the ELRS backpack.

The backpack will make sure that it is in station mode (connected to another WiFi AP) so that it can fetch the time data from a NTP server on the local network or the internet. In that case it will display a new tab in the web panel that allows the user to specify a NTP server, their timezone offset in hours, from -12 to 12, and if they use DST or not.

Also update the PlatformIO platform version to 4.2.0 to match the main ELRS repo as well as fix the issues regarding the time functions in the ESP8266/ESP8285 targets.

pkendall64 commented 1 year ago

I've been trying to test this locally and I cannot get it to work. I've change the DBGLN to INFOLN and it's failing to get the local time. I've set the NTP server to pool.ntp.org and also tried setting it to the IP address of my router which has an NTP server.

pkendall64 commented 1 year ago

I made some fixes and some defaults in the UI

daber commented 1 year ago

Since feature is in - would it be possible to extend it to sync with generic source. Since Hd zero googles ship without CMOS battery - it would be supper cool if for instance they sync time not with RTC but with TX time .