Skip to content

Commit

Permalink
Rename randomize to --channel-hop-randomly
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Jan 22, 2025
1 parent 1cd54a5 commit ab2976f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zigpy_cli/radio.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ async def change_channel(app, channel):

@radio.command()
@click.pass_obj
@click.option("-r", "--randomize", is_flag=True, type=bool, default=False)
@click.option("-r", "--channel-hop-randomly", is_flag=True, type=bool, default=False)
@click.option(
"-c",
"--channels",
Expand All @@ -252,8 +252,10 @@ async def change_channel(app, channel):
@click.option("-p", "--channel-hop-period", type=float, default=5.0)
@click.option("-o", "--output", type=click.File("wb"), required=True)
@click_coroutine
async def packet_capture(app, randomize, channels, channel_hop_period, output):
if not randomize:
async def packet_capture(
app, channel_hop_randomly, channels, channel_hop_period, output
):
if not channel_hop_randomly:
channels_iter = itertools.cycle(channels)
else:

Expand Down

0 comments on commit ab2976f

Please sign in to comment.