* Fix GPS that hard code 2080 as the start time.
Some GPS chips, such as the AG3335 in T1000e and L96 have a hardcoded
time of 2080-01-05 when they start up.
To fix that in a way that seems permanent, let's ignore times that
are more than 40 years since the firmware was built. We should followup
in late 2039 to see if any changes are needed.
Reported-By: @b8b8
* Update src/gps/RTC.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Put FORTY_YEARS in header and use in both places.
* Restore Ben's nicer log lines.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Further to https://github.com/meshtastic/firmware/pull/7772 ,
we discovered that some RTCs have hard-coded start times well in the
past.
This patch gives RTCs the same treatment as GPS - if the time is
earlier than BUILD_EPOCH, we don't use it.
Fixes#7771Fixes#7750
* Guard against timesources from the mesh if we have good time
* Trunk
* Consider phone time in the past 24 hours authoritative as well
* Rename
* GPS can be null
* Declaration
* Remove RemoteHardware
* Explicitly remove GPS
* Exclude GPS earlier for RAK2560
* Cleanup - remove unused defines.
There were a number of defined variables that were carried over
from old code. - Removed.
Also a typo. - Fixed fix.
Also duplicate definitions of the number of seconds in a day.
-deduplicated.
* Cleanup - remove unused defines.
There were a number of defined variables that were carried over
from old code. - Removed.
Also a typo. - Fixed fix.
Also duplicate definitions of the number of seconds in a day.
-deduplicated.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>