Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def recv_ex(ctx, recv_ex):
"""RSSI & SNR report on receive."""
lora = Rak811()
if recv_ex is None:
click.echo('Enabled' if lora.recv_ex == RecvEx.Enabled else 'Disabled')
else:
lora.recv_ex = (
RecvEx.Enabled if recv_ex == 'enable' else RecvEx.Disabled
)
if ctx.obj['VERBOSE']:
click.echo('RSSI & SNR report on receive {0}.'.format(
'Enabled' if recv_ex == 'enable' else 'Disabled'))
lora.close()
def recv_ex(ctx, recv_ex):
"""RSSI & SNR report on receive."""
lora = Rak811()
if recv_ex is None:
click.echo('Enabled' if lora.recv_ex == RecvEx.Enabled else 'Disabled')
else:
lora.recv_ex = (
RecvEx.Enabled if recv_ex == 'enable' else RecvEx.Disabled
)
if ctx.obj['VERBOSE']:
click.echo('RSSI & SNR report on receive {0}.'.format(
'Enabled' if recv_ex == 'enable' else 'Disabled'))
lora.close()