Skip to content

Conversation

@weebl2000
Copy link
Owner

No description provided.

weebl2000 and others added 30 commits December 31, 2025 13:30
The root cause was that RadioLib didn't know about the external GC1109
RF switch. Without the SX126X_RXEN/TXEN definitions, RadioLib never
called setRfSwitchPins(), so it couldn't automatically manage PA_TX_EN
during RX/TX transitions.
Set pinmode output/input too to make sure
Like SX1262 allows -9 dBm lowest, some allow lower but that probably
isn't useful
Especially with powersaving on the RTC can run hours ahead after only a
few days.
Unless your GPS is being spoofed there isn't really a downside to
syncing more often with GPS.

I understand the RTC is very stable, but especially with powersaving now
clock drift is worse, we should sync more often.
This also fixes repeaters waking up on button presses (they do not
currently)
When the RTC drifts ahead and is corrected via clock sync, stored
timestamps can appear to be in the future, causing underflow in
"time ago" calculations (wrapping to ~4 billion seconds).

Changes:
- Add safeElapsedSecs() helper that clamps to 0 if timestamp > now
- Apply to neighbor "heard X ago" displays in simple_repeater
- Apply to UI time displays in companion_radio
- Apply to TimeSeriesData calculations in simple_sensor
- Switch BaseChatMesh connection expiry from RTC to millis()

The connection expiry change is the most important: using monotonic
time (millis) makes it immune to RTC adjustments from GPS, NTP, or
manual sync.
Previously, on any new contact discovered we would try to write the
contacts again. If auto add isn't on, nothing has changed.

This can cause corruption by triggering more writes and also reduces
flash life.
Enable GPS time synchronization across all variants by passing
&rtc_clock to MicroNMEALocationProvider. When GPS gets a valid
fix, the RTC clock is now updated automatically every 30 minutes.

Updated 16 variants: rak4631, lilygo_tbeam_SX1262, rak_wismesh_tag,
lilygo_tbeam_supreme_SX1262, thinknode_m3, heltec_v4, thinknode_m1,
lilygo_tbeam_SX1276, meshadventurer, nano_g2_ultra, heltec_v3,
promicro, xiao_c3, heltec_tracker_v2, keepteen_lt1, heltec_mesh_solar.
Enable GPS time synchronization across all variants by passing
&rtc_clock to MicroNMEALocationProvider. When GPS gets a valid
fix, the RTC clock is now updated automatically every 30 minutes.

Updated 16 variants: rak4631, lilygo_tbeam_SX1262, rak_wismesh_tag,
lilygo_tbeam_supreme_SX1262, thinknode_m3, heltec_v4, thinknode_m1,
lilygo_tbeam_SX1276, meshadventurer, nano_g2_ultra, heltec_v3,
promicro, xiao_c3, heltec_tracker_v2, keepteen_lt1, heltec_mesh_solar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants