How to use the rak811.RecvEx function in rak811

To help you get started, we’ve selected a few rak811 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AmedeeBulle / pyrak811 / rak811 / cli.py View on Github external
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()
github AmedeeBulle / pyrak811 / rak811 / cli.py View on Github external
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()