mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
Previously, the merge only preserved path override fields and could overwrite existing GPS with null when the incoming frame had 0,0 coordinates.
Now it also preserves prior coordinates when the incoming update omits location.
This commit is contained in:
parent
10b63e0df2
commit
7633327f45
1 changed files with 4 additions and 1 deletions
|
|
@ -3913,11 +3913,14 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||
tag: 'Connector',
|
||||
);
|
||||
|
||||
// CRITICAL: Preserve user's path override when contact is refreshed from device
|
||||
// Preserve user-selected path settings and previously known GPS when
|
||||
// refreshed frames omit coordinates (lat/lon encoded as 0,0).
|
||||
_contacts[existingIndex] = contact.copyWith(
|
||||
lastMessageAt: mergedLastMessageAt,
|
||||
pathOverride: existing.pathOverride, // Preserve user's path choice
|
||||
pathOverrideBytes: existing.pathOverrideBytes,
|
||||
latitude: contact.latitude ?? existing.latitude,
|
||||
longitude: contact.longitude ?? existing.longitude,
|
||||
);
|
||||
|
||||
appLogger.info(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue