We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2f59028 + 52f8e82 commit bbc4589Copy full SHA for bbc4589
1 file changed
meshtastic/node.py
@@ -266,11 +266,10 @@ def getDisabledChannel(self):
266
267
def _getAdminChannelIndex(self):
268
"""Return the channel number of the admin channel, or 0 if no reserved channel"""
269
- c = self.getChannelByName("admin")
270
- if c:
271
- return c.index
272
- else:
273
- return 0
+ for c in self.channels or []:
+ if c.settings and c.settings.name.lower() == "admin":
+ return c.index
+ return 0
274
275
def setOwner(self, long_name=None, short_name=None, is_licensed=False):
276
"""Set device owner name"""
0 commit comments