Skip to content

feat(pager): show live local GPS receiver status - #409

Open
ericlewis wants to merge 216 commits into
meshtastic:pagerfrom
ericlewis:codex/local-gps-status
Open

ericlewis wants to merge 216 commits into
meshtastic:pagerfrom
ericlewis:codex/local-gps-status

Conversation

@ericlewis

@ericlewis ericlewis commented Sep 17, 2026

Copy link
Copy Markdown

Summary

  • Show whether the local GPS receiver is unavailable, searching, sleeping or has a fix, independently of mesh position broadcasts.
  • Display satellites used with freshness information and retain the last accepted position during receiver sleep.
  • Preserve configured fixed positions and fall back to existing packet-derived data when local receiver status is unavailable.

Implementation

Depends on #406. Merge/review order: #405#406#409#407#408. These are cumulative stages on the upstream pager branch at f31965d. Dependent PRs include earlier stages until those changes reach pager; use the focused comparison below to review this contribution.

Focused diff: #406 → #409. An optional LocalGPSStatus snapshot flows from PacketServer through the shared queue and PacketClient to ViewController, PluggableView and DashboardPlugin.

The shared snapshot is mutex-protected and coalesced rather than appended to the packet backlog. The controller polls on elapsed milliseconds, independently of wall-clock synchronization. Satellite counts represent GGA satellites used, not all satellites visible; stale counts are labelled as last known values. At this stage, coordinates continue through the existing MapPanel interface; #408 supplies the map plugin.

The producer is meshtastic/firmware#11892. Clients without this optional in-process hook retain their existing behavior. No protobuf schema or radio protocol changes are introduced.

Testing

  • Combined native tlora-pager-tft firmware build passed: pio run -e tlora-pager-tft -t mtjson, using firmware 6013049 and the public UI archive e9c8eee. All 648 tracked archive files match that UI snapshot; all four manifest artifact sizes and checksums matched.
  • This validates the complete combined implementation, not independent builds of each intermediate PR stage.
  • Automated tests: Not run. The native plugin firmware has not been flashed; hardware validation is pending.

Risks

Live receiver details require the firmware companion. Receiver sleep/wake, fix loss, satellite freshness and fixed-position precedence still need native Pager hardware verification; the combined build does not prove GPS reception.

mverch67 and others added 30 commits August 21, 2025 18:26
* Create: da.yml - full Danish translation

* Add: Danish translation + sort list of translations
* added Danish language support

* trunk fmt
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
* handle custom lora preset/frequency

* trunk fmt
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
* Explain the file system to format to

* Remove MBR section

I believe MBR is not relevant at all

* Add back MBR (also known as msdos)
* Map compatibility information

* Add compatibility information for CrowPanel Advance HMI

---------

Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
feat: Support 4.3" TFT display JC4827W543C
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
* add time zone offset

* reverse order new chats
@ericlewis
ericlewis marked this pull request as ready for review September 18, 2026 02:07
Copilot AI lite review requested due to automatic review settings September 18, 2026 02:07
@ericlewis
ericlewis marked this pull request as draft September 18, 2026 02:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Adds a process-local “live GPS receiver status” path from the packet layer to the Pager UI so receiver availability/sleep/fix/satellite freshness can update independently from position packets and broadcast intervals.

Changes:

  • Introduces LocalGPSStatus snapshot and a coalesced, mutex-protected handoff via SharedQueue.
  • Adds a client accessor and controller polling (monotonic millis() cadence) to push status into the UI.
  • Updates Pager rendering to show receiver state + freshness and avoid overwriting satellite labels with altitude-only text.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
include/util/LocalGPSStatus.h Defines the snapshot struct for local receiver state.
include/util/SharedQueue.h Adds mutex-protected storage for the latest LocalGPSStatus.
source/util/SharedQueue.cpp Implements set/get for the coalesced GPS status snapshot.
include/comms/PacketServer.h Exposes setLocalGPSStatus() for producers.
source/comms/packet/PacketServer.cpp Forwards GPS status writes into SharedQueue.
include/comms/IClientBase.h Adds optional getLocalGPSStatus() accessor with a safe default.
include/comms/PacketClient.h Declares client-side getLocalGPSStatus() override.
source/comms/packet/PacketClient.cpp Implements reading GPS status from SharedQueue.
include/graphics/common/MeshtasticView.h Adds updateLocalGPSStatus() view hook.
include/graphics/common/ViewController.h Adds poll timestamp state.
source/graphics/common/ViewController.cpp Polls local GPS status on a monotonic 1s cadence and updates the view.
include/graphics/view/TFT/TFTView_320x240.h Pager-only fields + override for live GPS status updates.
source/graphics/TFT/TFTView_320x240.cpp Pager-only rendering of receiver status + updated position/satellite label behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread source/graphics/TFT/TFTView_320x240.cpp Outdated
Comment on lines +5251 to +5255
if (!pagerGPSStatusKnown && sats != 0)
pagerPacketSatellites = sats;
if (lat != 0 || lon != 0 || (pagerGPSStatusKnown && pagerGPSStatus.hasPosition))
pagerGPSDetails = buf;
renderPagerGPSStatus();
Comment thread source/graphics/TFT/TFTView_320x240.cpp Outdated
Comment on lines +5186 to +5188
const bool positionChanged = !pagerGPSStatusKnown || !pagerGPSStatus.hasPosition ||
pagerGPSStatus.latitude_i != status.latitude_i ||
pagerGPSStatus.longitude_i != status.longitude_i || pagerGPSStatus.altitude != status.altitude ||
Comment on lines +89 to +96
// Receiver freshness must keep advancing across RTC corrections.
const uint32_t nowMs = millis();
if (nowMs - lastGPSPollMs >= 1000) {
lastGPSPollMs = nowMs;
LocalGPSStatus gpsStatus;
if (setupDone && configCompleted && client->getLocalGPSStatus(gpsStatus))
view->updateLocalGPSStatus(gpsStatus);
}
Comment thread source/graphics/TFT/TFTView_320x240.cpp Outdated
if (enabled && pagerGPSStatusKnown) {
char satellites[64];
if (pagerGPSStatus.satellitesValid) {
const bool current = pagerGPSStatus.awake && pagerGPSStatus.satellitesAgeMs < 5000;
Reconcile the published contribution with the native Pager plugin branch.
Preserve the existing PR history and the cumulative dependency stage.
Reconcile the published contribution with the native Pager plugin branch.
Preserve the existing PR history and the cumulative dependency stage.
Reconcile the published contribution with the native Pager plugin branch.
Preserve the existing PR history and the cumulative dependency stage.
@ericlewis
ericlewis changed the base branch from master to pager September 18, 2026 02:58
Retain the published PR head and the preceding cumulative PR as parents.
Keep the intended feature-stage tree unchanged.
Retain the published PR head and the preceding cumulative PR as parents.
Keep the intended feature-stage tree unchanged.
@ericlewis ericlewis changed the title feat(ui): display live local GPS receiver status feat(pager): show live local GPS receiver status Sep 18, 2026
@ericlewis
ericlewis marked this pull request as ready for review September 18, 2026 03:02
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.