Skip to content

Commit 90c218d

Browse files
authored
Merge pull request #489 from meshtastic/precision-try-2
Fixup handling for radio configs with disabled channel
2 parents 48fe844 + a067c92 commit 90c218d

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

meshtastic/node.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def showChannels(self):
5252
# don't show disabled channels
5353
if channel_pb2.Channel.Role.Name(c.role) != "DISABLED":
5454
print(
55-
f" {channel_pb2.Channel.Role.Name(c.role)} psk={pskToString(c.settings.psk)} {cStr}"
55+
f" Index {c.index}: {channel_pb2.Channel.Role.Name(c.role)} psk={pskToString(c.settings.psk)} {cStr}"
5656
)
5757
publicURL = self.getURL(includeAll=False)
5858
adminURL = self.getURL(includeAll=True)
@@ -691,13 +691,7 @@ def onResponseRequestChannel(self, p):
691691
# for stress testing, we can always download all channels
692692
fastChannelDownload = True
693693

694-
# Once we see a response that has NO settings, assume
695-
# we are at the end of channels and stop fetching
696-
quitEarly = (
697-
c.role == channel_pb2.Channel.Role.DISABLED
698-
) and fastChannelDownload
699-
700-
if quitEarly or index >= 8 - 1:
694+
if index >= 8 - 1:
701695
logging.debug("Finished downloading channels")
702696

703697
self.channels = self.partialChannels

0 commit comments

Comments
 (0)