From 7ebbc390d2abfdfa4d53a629dbf1fa22bfff1fa4 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 2 Mar 2024 08:00:26 -0600 Subject: [PATCH] Add via_mqtt and hops_away to NodeInfo/Lite --- meshtastic/deviceonly.options | 3 ++- meshtastic/deviceonly.proto | 10 ++++++++++ meshtastic/mesh.options | 1 + meshtastic/mesh.proto | 10 ++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/meshtastic/deviceonly.options b/meshtastic/deviceonly.options index 3992bf5..d870ace 100644 --- a/meshtastic/deviceonly.options +++ b/meshtastic/deviceonly.options @@ -15,4 +15,5 @@ *DeviceState.node_remote_hardware_pins max_count:12 -*NodeInfoLite.channel int_size:8 \ No newline at end of file +*NodeInfoLite.channel int_size:8 +*NodeInfoLite.hops_away int_size:8 \ No newline at end of file diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 4f6b9a9..169df1c 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -116,6 +116,16 @@ message NodeInfoLite { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if adjacent) + */ + uint32 hops_away = 9; } /* diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 5053693..aedfe99 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -14,6 +14,7 @@ *Data.payload max_size:237 *NodeInfo.channel int_size:8 +*NodeInfo.hops_away int_size:8 # Big enough for 1.2.28.568032c-d *MyNodeInfo.firmware_version max_size:18 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 28143e4..76aa01b 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1116,6 +1116,16 @@ message NodeInfo { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if adjacent) + */ + uint32 hops_away = 9; } /*