From c8fdd4efd0430cd4c05547c83ceefc4b4c8d37e4 Mon Sep 17 00:00:00 2001 From: Tim Gunter Date: Sat, 10 Apr 2021 02:29:55 -0700 Subject: [PATCH] Make default to include self in showNodes() --- meshtastic/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 568624d..5e90061 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -172,7 +172,7 @@ class MeshInterface: for n in self.nodes.values(): print(f" {stripnl(n)}", file=file) - def showNodes(self, file=sys.stdout): + def showNodes(self, includeSelf=True, file=sys.stdout): """Show table summary of nodes in mesh""" def formatFloat(value, precision=2, unit=''): return f'{value:.{precision}f}{unit}' if value else None @@ -185,7 +185,7 @@ class MeshInterface: rows = [] for node in self.nodes.values(): - if node['num'] == self.localNode.nodeNum: + if not includeSelf and node['num'] == self.localNode.nodeNum: continue row = { "N": 0 }