From 825d333ea48f3d492e81ee5631ba75b1496fca63 Mon Sep 17 00:00:00 2001 From: Clive Blackledge Date: Mon, 13 Oct 2025 15:21:30 -0700 Subject: [PATCH] Saving node role as a NodeHotentry --- src/mesh/NodeDB.cpp | 1 + src/mesh/NodeDB.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 48cc033c7..fd0fb9f6c 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -152,6 +152,7 @@ void NodeDB::syncHotFromCold(size_t index) hot.channel = node.channel; hot.next_hop = node.next_hop; hot.bitfield = node.bitfield; + hot.role = static_cast(node.user.role); hot.hops_away = node.hops_away; uint8_t flags = 0; diff --git a/src/mesh/NodeDB.h b/src/mesh/NodeDB.h index 0992e7444..f3042f6cb 100644 --- a/src/mesh/NodeDB.h +++ b/src/mesh/NodeDB.h @@ -54,6 +54,7 @@ struct NodeHotEntry { uint32_t last_heard = 0; float snr = 0.0f; uint32_t bitfield = 0; + uint8_t role = meshtastic_Config_DeviceConfig_Role_CLIENT; uint8_t channel = 0; uint8_t next_hop = 0; uint8_t hops_away = 0;