mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-08 12:36:42 +00:00
is_ignored is not a boring node either
This commit is contained in:
parent
d20450dc53
commit
6f305b37b4
@ -1231,12 +1231,12 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)
|
|||||||
int oldestBoringIndex = -1;
|
int oldestBoringIndex = -1;
|
||||||
for (int i = 1; i < numMeshNodes; i++) {
|
for (int i = 1; i < numMeshNodes; i++) {
|
||||||
// Simply the oldest non-favorite node
|
// Simply the oldest non-favorite node
|
||||||
if (!meshNodes->at(i).is_favorite && meshNodes->at(i).last_heard < oldest) {
|
if (!meshNodes->at(i).is_favorite && !meshNodes->at(i).is_ignored && meshNodes->at(i).last_heard < oldest) {
|
||||||
oldest = meshNodes->at(i).last_heard;
|
oldest = meshNodes->at(i).last_heard;
|
||||||
oldestIndex = i;
|
oldestIndex = i;
|
||||||
}
|
}
|
||||||
// The oldest "boring" node
|
// The oldest "boring" node
|
||||||
if (!meshNodes->at(i).is_favorite && meshNodes->at(i).user.public_key.size == 0 &&
|
if (!meshNodes->at(i).is_favorite && !meshNodes->at(i).is_ignored && meshNodes->at(i).user.public_key.size == 0 &&
|
||||||
meshNodes->at(i).last_heard < oldestBoring) {
|
meshNodes->at(i).last_heard < oldestBoring) {
|
||||||
oldestBoring = meshNodes->at(i).last_heard;
|
oldestBoring = meshNodes->at(i).last_heard;
|
||||||
oldestBoringIndex = i;
|
oldestBoringIndex = i;
|
||||||
|
Loading…
Reference in New Issue
Block a user