From 35d6e8b1a300b2d8b8cc4a426061387aa608d672 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:28:17 +0200 Subject: [PATCH] feat(nav): navigate to / save a location shared in a message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Locations already travel as plain text ({loc} expands to "lat,lon"), so any message carrying coordinates can now be acted on. In the fullscreen message view, the context-menu (Hold Enter) gains Navigate and Save waypoint entries whenever the message contains a coordinate — alongside Reply. - geo::parseLatLon: shared scanner for an embedded "lat,lon" (the {loc} format), with an optional [WAY] tag that supplies a label. Range-checked, requires a decimal point to avoid matching plain integer pairs. Will also back the waypoint-share feature later. - QuickMsgScreen: Navigate opens NavView inline (To/Hdg/distance, honouring the global Units setting) over the message, back returns to it; Save waypoint stores the point (label from [WAY], else auto-named). Works in both DM and channel histories, and on incoming or outgoing messages. Co-Authored-By: Claude Opus 4.8 --- examples/companion_radio/GeoUtils.h | 51 +++++++++ .../companion_radio/ui-new/QuickMsgScreen.h | 105 +++++++++++++++--- 2 files changed, 143 insertions(+), 13 deletions(-) diff --git a/examples/companion_radio/GeoUtils.h b/examples/companion_radio/GeoUtils.h index 4e525ef5..5175ad5f 100644 --- a/examples/companion_radio/GeoUtils.h +++ b/examples/companion_radio/GeoUtils.h @@ -6,6 +6,9 @@ #include #include +#include +#include +#include #ifndef M_PI #define M_PI 3.14159265358979323846 @@ -58,4 +61,52 @@ static inline void fmtDist(char* buf, int n, float km, bool imperial) { } } +// Tag marking a shared waypoint inside a message: "[WAY],