mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-06-28 05:52:02 +02:00
fix: don't overwrite Node.channel from MAP_REPORT_APP if already set (#147)
NODEINFO_APP is the better / authoritative source for a nodes primary channel. MAP_REPORT_APP packets can arrive on a different MQTT uplink channel and are unconditionally overwriting the channel set by NODEINFO, causing nodes to appear on the wrong channel in the map and channel filters. now MAP_REPORT_APP only sets Node.channel when it is not (yetw) known, making it a fallback rather than an override.
This commit is contained in:
@@ -109,7 +109,8 @@ async def process_envelope(topic, env):
|
||||
node.short_name = map_report.short_name
|
||||
node.hw_model = hw_model
|
||||
node.role = role
|
||||
node.channel = env.channel_id
|
||||
if not node.channel:
|
||||
node.channel = env.channel_id
|
||||
node.last_lat = map_report.latitude_i
|
||||
node.last_long = map_report.longitude_i
|
||||
node.firmware = map_report.firmware_version
|
||||
|
||||
Reference in New Issue
Block a user