def perform_led_stream(dev, args):
    if args.file is not None:
        send_music_led_stream(dev, DEVICE[args.device_type], args.led_id,
                              args.freq, args.file)
    else:
        send_continuous_led_stream(dev, DEVICE[args.device_type], args.led_id,
                                   args.freq)
Пример #2
0
def perform_led_stream(dev, args):
    if args.file is not None:
        try:
            send_music_led_stream(dev, args.led_id, args.freq, args.file)
        except NameError:
            print('Music LED stream functionality is not available')
    else:
        send_continuous_led_stream(dev, args.led_id, args.freq)